Fix bugs when configuring database session within threads.
This got missed during a recent refactor.
This commit is contained in:
parent
3fa9f06457
commit
b2aa45ceb0
|
@ -143,7 +143,7 @@ class ExecuteBatch(View):
|
|||
def execute_batch(self, batch, progress):
|
||||
from rattail.db import Session
|
||||
session = Session()
|
||||
configure_session(session)
|
||||
configure_session(self.request.rattail_config, session)
|
||||
batch = session.merge(batch)
|
||||
|
||||
if not batch.execute(progress):
|
||||
|
|
|
@ -345,7 +345,7 @@ class CreateProductsBatch(ProductsGrid):
|
|||
def make_batch(self, provider, progress):
|
||||
from rattail.db import Session
|
||||
session = Session()
|
||||
configure_session(session)
|
||||
configure_session(self.request.rattail_config, session)
|
||||
|
||||
self._filter_config = self.filter_config()
|
||||
self._sort_config = self.sort_config()
|
||||
|
|
Loading…
Reference in a new issue