Fix bugs when configuring database session within threads.

This got missed during a recent refactor.
This commit is contained in:
Lance Edgar 2014-11-11 10:48:48 -06:00
parent 3fa9f06457
commit b2aa45ceb0
2 changed files with 2 additions and 2 deletions

View file

@ -143,7 +143,7 @@ class ExecuteBatch(View):
def execute_batch(self, batch, progress): def execute_batch(self, batch, progress):
from rattail.db import Session from rattail.db import Session
session = Session() session = Session()
configure_session(session) configure_session(self.request.rattail_config, session)
batch = session.merge(batch) batch = session.merge(batch)
if not batch.execute(progress): if not batch.execute(progress):

View file

@ -345,7 +345,7 @@ class CreateProductsBatch(ProductsGrid):
def make_batch(self, provider, progress): def make_batch(self, provider, progress):
from rattail.db import Session from rattail.db import Session
session = Session() session = Session()
configure_session(session) configure_session(self.request.rattail_config, session)
self._filter_config = self.filter_config() self._filter_config = self.filter_config()
self._sort_config = self.sort_config() self._sort_config = self.sort_config()