fix(aurora): fix an attributeerror when editing a case type that doesn't use durations
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s

This commit is contained in:
Seaswimmer 2024-08-19 17:21:33 -04:00
parent 0c2cde1a78
commit 29f393fa89
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -1081,7 +1081,7 @@ class Aurora(commands.Cog):
"timestamp": old_moderation.timestamp,
"reason": old_moderation.reason,
"user_id": old_moderation.moderator_id,
"duration": timedelta_to_string(old_moderation.duration),
"duration": timedelta_to_string(old_moderation.duration) if old_moderation.duration else None,
"end_timestamp": old_moderation.end_timestamp,
}))
moderation.changes.append(Change.from_dict(interaction.client, {