quote DailyTagSpend in order to look for the right View (#8947)

PostgreSQL treats unquoted identifiers as lowercase by default. In our query, we're using "DailyTagSpend" (with capital letters), but PostgreSQL will be looking for "dailytagspend" (all lowercase).
This commit is contained in:
Michael Schmid 2025-03-03 00:36:55 -05:00 committed by GitHub
parent 54b7f17ca6
commit 842d8dec09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2798,7 +2798,7 @@ async def ui_get_spend_by_tags(
spend_date,
log_count,
total_spend
FROM DailyTagSpend
FROM "DailyTagSpend"
WHERE spend_date >= $1::date AND spend_date <= $2::date
ORDER BY total_spend DESC;
"""
@ -2814,7 +2814,7 @@ async def ui_get_spend_by_tags(
individual_request_tag,
SUM(log_count) AS log_count,
SUM(total_spend) AS total_spend
FROM DailyTagSpend
FROM "DailyTagSpend"
WHERE spend_date >= $1::date AND spend_date <= $2::date
AND individual_request_tag = ANY($3::text[])
GROUP BY individual_request_tag