Skip to content

Commit 14093ac

Browse files
committed
hotfix(billing): infinite usage glitch fix
1 parent 181244a commit 14093ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/services/billing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ async def get_usage_logs(client, user_id: str, page: int = 0, items_per_page: in
318318

319319
while True:
320320
threads_batch = await client.table('threads') \
321-
.select('thread_id') \
321+
.select('thread_id, agent_runs(thread_id)') \
322322
.eq('account_id', user_id) \
323-
.gte('created_at', start_of_month.isoformat()) \
323+
.gte('agent_runs.created_at', start_of_month.isoformat()) \
324324
.range(offset, offset + batch_size - 1) \
325325
.execute()
326326

0 commit comments

Comments
 (0)