Use global Session from rattail (again).

This commit is contained in:
Lance Edgar 2014-02-15 19:27:22 -08:00
parent f3947dc6de
commit d6f2b1afb1
2 changed files with 2 additions and 4 deletions

View file

@ -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)

View file

@ -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()