buggix
This commit is contained in:
parent
b4d01099ac
commit
0a9ebf48cf
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user