aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pydis_site/apps/api/models/bot/metricity.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py
index 81d6e788..6f03baf0 100644
--- a/pydis_site/apps/api/models/bot/metricity.py
+++ b/pydis_site/apps/api/models/bot/metricity.py
@@ -55,8 +55,8 @@ class Metricity:
FROM (
SELECT
to_timestamp(
- floor((extract('epoch' from created_at) / {BLOCK_INTERVAL} ))
- * {BLOCK_INTERVAL}
+ floor((extract('epoch' from created_at) / %d ))
+ * %d
)
AT TIME ZONE 'UTC' AS interval
FROM messages
@@ -66,7 +66,7 @@ class Metricity:
GROUP BY interval
) block_query;
""",
- [user_id]
+ [BLOCK_INTERVAL, BLOCK_INTERVAL, user_id]
)
values = self.cursor.fetchone()