aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Boris Muratov <[email protected]>2021-08-04 13:38:06 +0300
committerGravatar GitHub <[email protected]>2021-08-04 13:38:06 +0300
commit3cc05c6c0dce72df83efbb69fb38dd22652b53b9 (patch)
treed3535c3136b88da5f3880b021fd8e6f3010d1566
parentForce utf-8 decoding when querying metabase (diff)
parentMerge branch 'main' into bug/mod/1706/infr-append-no-reason (diff)
Merge pull request #1708 from python-discord/bug/mod/1706/infr-append-no-reason
Fix TypeError when infraction append is not given a reason
-rw-r--r--bot/exts/moderation/infraction/management.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/infraction/management.py b/bot/exts/moderation/infraction/management.py
index 4b0cb78a5..3094159cd 100644
--- a/bot/exts/moderation/infraction/management.py
+++ b/bot/exts/moderation/infraction/management.py
@@ -81,7 +81,7 @@ class ModManagement(commands.Cog):
"""
old_reason = infraction["reason"]
- if old_reason is not None:
+ if old_reason is not None and reason is not None:
add_period = not old_reason.endswith((".", "!", "?"))
reason = old_reason + (". " if add_period else " ") + reason