aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2020-02-29 08:30:14 +0100
committerGravatar GitHub <[email protected]>2020-02-29 08:30:14 +0100
commit0323919b08342fd650ff32e1f3a2fc2d9eee9c59 (patch)
treeac52774e7e19917d4fed6ff115dea37427a1080d
parentMerge branch 'master' into #364-offensive-msg-autodeletion (diff)
Make sure that the offensive message deletion date returned by the API is naive
It could have caused an issue later with a mix of naive and aware datetime Co-Authored-By: Sebastiaan Zeeff <[email protected]>
-rw-r--r--bot/cogs/filtering.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index 83e706a26..2d91695f3 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -400,7 +400,7 @@ class Filtering(Cog, Scheduler):
async def _scheduled_task(self, msg: dict) -> None:
"""Delete an offensive message once its deletion date is reached."""
- delete_at = dateutil.parser.isoparse(msg['delete_date'])
+ delete_at = dateutil.parser.isoparse(msg['delete_date']).replace(tzinfo=None)
await wait_until(delete_at)
await self.delete_offensive_msg(msg)