bugfix
This commit is contained in:
parent
240ac418f4
commit
be7ba75044
@ -40,13 +40,14 @@ async def checkCustomerBalance(llmid, userorgid):
|
|||||||
raise e
|
raise e
|
||||||
llm = llms[0].copy()
|
llm = llms[0].copy()
|
||||||
if llm.ownerid == userorgid:
|
if llm.ownerid == userorgid:
|
||||||
|
debug(f'self orgid user')
|
||||||
return True
|
return True
|
||||||
balance = await getCustomerBalance(sor, userorgid)
|
balance = await getCustomerBalance(sor, userorgid)
|
||||||
bal = 0 if balance is None else balance
|
bal = 0 if balance is None else balance
|
||||||
if llm.min_balance is None:
|
if llm.min_balance is None:
|
||||||
llm.min_balance = 0.00
|
llm.min_balance = 0.00
|
||||||
|
debug(f'{userorgid=}, {balance=}, {llm.min_balance=}, {llm.ppid=}')
|
||||||
ret = llm.ppid and llm.min_balance < bal
|
ret = llm.ppid and llm.min_balance < bal
|
||||||
debug(f'{llms=},{userorgid=},{balance=},{ret=}')
|
|
||||||
return ret
|
return ret
|
||||||
debug(f'{userorgid=} checkCustomerBalance() failed')
|
debug(f'{userorgid=} checkCustomerBalance() failed')
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user