diff options
| author | 2020-10-27 02:16:40 +0000 | |
|---|---|---|
| committer | 2020-10-27 02:16:40 +0000 | |
| commit | 2ef2a936ca43dd615cf6fb831b868d38abb58bae (patch) | |
| tree | c70bd04b2c57b3f6712a1b8a5430a78fbee222b5 | |
| parent | Constant was never used :man_facepalming: (diff) | |
Use SQL formatting instead of f-strings for injecting values
Diffstat (limited to '')
| -rw-r--r-- | pydis_site/apps/api/models/bot/metricity.py | 6 | 
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() | 
