Make sure correct "isolated" session is used when multiple engines exist
This commit is contained in:
parent
aca23ffe6d
commit
6208a98ad3
|
@ -69,6 +69,11 @@ class CoreOfficeMasterView(MasterView):
|
||||||
|
|
||||||
def make_isolated_session(self):
|
def make_isolated_session(self):
|
||||||
from corepos.db.office_op import Session as CoreSession
|
from corepos.db.office_op import Session as CoreSession
|
||||||
|
|
||||||
|
dbkey = self.get_current_engine_dbkey()
|
||||||
|
if dbkey != 'default' and dbkey in self.rattail_config.corepos_engines:
|
||||||
|
return CoreSession(bind=self.rattail_config.corepos_engines[dbkey])
|
||||||
|
|
||||||
return CoreSession()
|
return CoreSession()
|
||||||
|
|
||||||
def render_local_date(self, obj, field):
|
def render_local_date(self, obj, field):
|
||||||
|
|
Loading…
Reference in a new issue