fix(aurora): don't convert end_timestamp to an integer
Some checks failed
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 26s

This commit is contained in:
Seaswimmer 2024-05-06 14:44:06 -04:00
parent 84235d6504
commit b7b6dc2f2e
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -174,14 +174,13 @@ class Moderation(AuroraGuildModel):
timestamp = datetime.fromtimestamp(timestamp)
if duration != "NULL" and duration is not None:
end_timedelta = timestamp + duration
end_timestamp = int(end_timedelta.timestamp())
end_timestamp = timestamp + duration
else:
duration = None
end_timestamp = None
if not expired:
if timestamp.timestamp() > end_timestamp:
if timestamp > end_timestamp:
expired = True
else:
expired = False