bugfix
This commit is contained in:
parent
f9681c22ce
commit
190fb2e463
@ -15,11 +15,15 @@ async def checkCustomerBalance(llmid, userorgid):
|
|||||||
e = Exception(f'llm({llmid}) not exists')
|
e = Exception(f'llm({llmid}) not exists')
|
||||||
exception(f'{e}')
|
exception(f'{e}')
|
||||||
raise e
|
raise e
|
||||||
if llms[0].ownerid == userorgid:
|
llm = llms[0]
|
||||||
|
if llm.ownerid == userorgid:
|
||||||
return True
|
return True
|
||||||
balance = await getCustomerBalance(sor, userorgid)
|
balance = await getCustomerBalance(sor, userorgid)
|
||||||
if balance is None: balance = 0.00
|
if balance is None:
|
||||||
return llms[0].ppid and llms[0].min_balance < balance
|
balance = 0.00
|
||||||
|
if llm.min_balance is None:
|
||||||
|
llm.min_balance = 0.00
|
||||||
|
return llm.ppid and llm.min_balance < balance
|
||||||
return False
|
return False
|
||||||
|
|
||||||
async def llm_accounting(request, llmid,
|
async def llm_accounting(request, llmid,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user