Change the sections used for corepos db config
This commit is contained in:
parent
8da0f1b17f
commit
e76aa9a966
|
@ -40,12 +40,12 @@ class RattailCOREPOSExtension(ConfigExtension):
|
||||||
from corepos.db import Session as CoreSession
|
from corepos.db import Session as CoreSession
|
||||||
from corepos.trans.db import Session as CoreTransSession
|
from corepos.trans.db import Session as CoreTransSession
|
||||||
|
|
||||||
engines = get_engines(config, section='rattail_corepos.db')
|
engines = get_engines(config, section='corepos.db.office_op')
|
||||||
config.corepos_engines = engines
|
config.corepos_engines = engines
|
||||||
config.corepos_engine = engines.get('default')
|
config.corepos_engine = engines.get('default')
|
||||||
CoreSession.configure(bind=config.corepos_engine)
|
CoreSession.configure(bind=config.corepos_engine)
|
||||||
|
|
||||||
engines = get_engines(config, section='rattail_coretrans.db')
|
engines = get_engines(config, section='corepos.db.office_trans')
|
||||||
config.coretrans_engines = engines
|
config.coretrans_engines = engines
|
||||||
config.coretrans_engine = engines.get('default')
|
config.coretrans_engine = engines.get('default')
|
||||||
CoreTransSession.configure(bind=config.coretrans_engine)
|
CoreTransSession.configure(bind=config.coretrans_engine)
|
||||||
|
|
Loading…
Reference in a new issue