From cb2d892c37f68aa72b3078905d26030ea50368f2 Mon Sep 17 00:00:00 2001 From: Daniel Brown Date: Wed, 18 Sep 2019 15:30:46 -0500 Subject: Infraction Date Humanization - Changed the if statement to use `is None` for code clarity. Signed-off-by: Daniel Brown --- bot/cogs/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py index f16a13a3e..2c7253c7b 100644 --- a/bot/cogs/moderation.py +++ b/bot/cogs/moderation.py @@ -1261,7 +1261,7 @@ class Moderation(Scheduler, Cog): user_id = infraction_object["user"] hidden = infraction_object["hidden"] created = datetime.fromisoformat(infraction_object["inserted_at"].strftime("%Y-%m-%d %H:%M")) - if not infraction_object["expires_at"]: + if infraction_object["expires_at"] is None: expires = "*Permanent*" else: expires = datetime.fromisoformat(infraction_object["expires_at"].strftime("%Y-%m-%d %H:%M")) -- cgit v1.2.3