Change the sections used for corepos db config

This commit is contained in:
Lance Edgar 2019-10-10 20:13:39 -05:00
parent 8da0f1b17f
commit e76aa9a966

View file

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