fix(register): free customer bind 池名硬编码'discount'→get_module_dbname('discount')
pipeline-app 共库单池,硬编码'discount'导致 dbdesc=None → 'NoneType' object has no attribute 'get'。 租户域名逻辑本身无误:域名未注册→parentid=None→reseller_id='0'平台自营兜底。 改用 get_module_dbname 后 sage(discount独立库)/pipeline-app(共库)双宿主均正确。
This commit is contained in:
parent
47cad5474a
commit
9b695301ca
@ -52,7 +52,7 @@ async with db.sqlorContext(dbname) as sor:
|
|||||||
# 非促销码注册: 创建自由客户归属记录 (bind_type=3 域名注册)
|
# 非促销码注册: 创建自由客户归属记录 (bind_type=3 域名注册)
|
||||||
try:
|
try:
|
||||||
reseller_id = parentid or '0'
|
reseller_id = parentid or '0'
|
||||||
async with DBPools().sqlorContext('discount') as disc_sor:
|
async with DBPools().sqlorContext(get_module_dbname('discount')) as disc_sor:
|
||||||
existing = await disc_sor.sqlExe(
|
existing = await disc_sor.sqlExe(
|
||||||
'SELECT id FROM discount_customer_bind WHERE customerid = ${cid}$',
|
'SELECT id FROM discount_customer_bind WHERE customerid = ${cid}$',
|
||||||
{'cid': orgid}
|
{'cid': orgid}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user