From be94806d916cb95495ec46205c1cd78829c8484f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 30 Mar 2026 08:31:26 +0800 Subject: [PATCH] bugfix --- llmage/accounting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llmage/accounting.py b/llmage/accounting.py index 7fb7f22..410dc75 100644 --- a/llmage/accounting.py +++ b/llmage/accounting.py @@ -10,7 +10,7 @@ from accounting.getaccount import getCustomerBalance async def llm_charging(sor, ppid, llmusage): env = ServerEnv() prices = await env.pricing_program_charging(sor, ppid, llmusage.usage) - if not pricing: + if len(prics) == 0: d = DictObject() d.original_amount = d.amount = d.cost = 0.00 return d @@ -62,6 +62,7 @@ async def llm_accounting(request, llmusage): e = Exception(f'llm ({llmid}) donot has a pricing_program') exception(f'{e}') raise e + customerid = llmusage.userorgid resellerid = recs[0].ownerid providerid = recs[0].providerid trans_amount = llmusage.amount