fix(aurora): fixed debug logging
All checks were successful
Actions / Build Documentation (MkDocs) (pull_request) Successful in 30s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 43s

This commit is contained in:
Seaswimmer 2024-08-14 14:37:32 -04:00
parent c5472d25c1
commit 48d2f8b416
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -207,8 +207,12 @@ class Moderation(AuroraGuildModel):
@classmethod
async def from_result(cls, bot: Red, result: Iterable, guild_id: int) -> "Moderation":
if result[7] is not None and result[7] != "NULL":
try:
hours, minutes, seconds = map(int, result[7].split(':'))
duration = timedelta(hours=hours, minutes=minutes, seconds=seconds)
except ValueError as e:
logger.error("Error parsing duration for case %s: %s", result[0], result[7])
raise e
else:
duration = None