fix(proxy): handle None values in daily spend sort key (#16245)
Fixes TypeError when sorting daily spend transactions with missing entity IDs (e.g., null tags). Changed x[1].get(entity_id_field) to x[1].get(entity_id_field) or "" to provide a sortable default value when the field is None, preventing comparison errors between NoneType and str.
This commit is contained in:
parent
2ed95e216c
commit
7878ebd2a2
@ -997,7 +997,7 @@ class DBSpendUpdateWriter:
|
||||
# should sort by the table first.
|
||||
key=lambda x: (
|
||||
x[1]["date"],
|
||||
x[1].get(entity_id_field),
|
||||
x[1].get(entity_id_field) or "",
|
||||
x[1]["api_key"],
|
||||
x[1]["model"],
|
||||
x[1]["custom_llm_provider"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user