From b2aa45ceb07892d6850914c3147d46ba641e7ea4 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 11 Nov 2014 10:48:48 -0600 Subject: [PATCH] Fix bugs when configuring database session within threads. This got missed during a recent refactor. --- tailbone/views/batches/core.py | 2 +- tailbone/views/products.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tailbone/views/batches/core.py b/tailbone/views/batches/core.py index 062f578b..155e03fc 100644 --- a/tailbone/views/batches/core.py +++ b/tailbone/views/batches/core.py @@ -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): diff --git a/tailbone/views/products.py b/tailbone/views/products.py index b543f329..eec5b636 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -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()