fix: use timedelta instead of string for interval query params

This commit is contained in:
Celes Renata
2026-04-14 20:10:38 +00:00
parent c438d0d60a
commit d37a5732d0
+4 -4
View File
@@ -209,10 +209,10 @@ ORDER BY md.published_at DESC
# Horizon → interval mapping
# ---------------------------------------------------------------------------
_HORIZON_INTERVALS: dict[str, str] = {
"1d": "1 day",
"7d": "7 days",
"30d": "30 days",
_HORIZON_INTERVALS: dict[str, timedelta] = {
"1d": timedelta(days=1),
"7d": timedelta(days=7),
"30d": timedelta(days=30),
}