This commit is contained in:
yumoqing 2026-05-23 17:20:26 +08:00
parent b4d01099ac
commit 0a9ebf48cf
2 changed files with 2 additions and 1 deletions

View File

@ -47,8 +47,8 @@ async def checkCustomerBalance(llmid, userid, userorgid, catelogid=None):
return True
balance = 0.00
tpac = await get_user_tpac(userid)
debug(f'{tpac=}')
if tpac:
debug(f'{tpac=}')
balance = await get_tpac_balance(tpac, userid)
else:
async with get_sor_context(env, 'accounting') as sor:

View File

@ -28,6 +28,7 @@ async def get_user_tpac(userid):
recs = await sor.R('users', {'id': userid})
if recs:
tpac = config.tpacs.get(recs[0].sync_from)
debug(f'{userid=},{recs[0].sync_from=},{tpac=}
return tpac
return None