diff --git a/tailbone/views/batches/core.py b/tailbone/views/batches/core.py index 67716106..7b2aab4c 100644 --- a/tailbone/views/batches/core.py +++ b/tailbone/views/batches/core.py @@ -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) diff --git a/tailbone/views/products.py b/tailbone/views/products.py index 5f5804ac..8b2104a3 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -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()