Use global Session
from rattail (again).
This commit is contained in:
parent
f3947dc6de
commit
d6f2b1afb1
|
@ -141,8 +141,7 @@ class BatchCrud(CrudView):
|
|||
class ExecuteBatch(View):
|
||||
|
||||
def execute_batch(self, batch, progress):
|
||||
from rattail.db import get_session_class
|
||||
Session = get_session_class(edbob.config)
|
||||
from rattail.db import Session
|
||||
session = Session()
|
||||
batch = session.merge(batch)
|
||||
|
||||
|
|
|
@ -300,8 +300,7 @@ def print_labels(request):
|
|||
class CreateProductsBatch(ProductsGrid):
|
||||
|
||||
def make_batch(self, provider, progress):
|
||||
from rattail.db import get_session_class
|
||||
Session = get_session_class(edbob.config)
|
||||
from rattail.db import Session
|
||||
session = Session()
|
||||
|
||||
self._filter_config = self.filter_config()
|
||||
|
|
Loading…
Reference in a new issue