From d6f2b1afb111077783f674c852734bf30455feff Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 15 Feb 2014 19:27:22 -0800 Subject: [PATCH] Use global `Session` from rattail (again). --- tailbone/views/batches/core.py | 3 +-- tailbone/views/products.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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()