fix(aurora): don't convert end_timestamp to an integer
This commit is contained in:
parent
84235d6504
commit
b7b6dc2f2e
1 changed files with 2 additions and 3 deletions
|
@ -174,14 +174,13 @@ class Moderation(AuroraGuildModel):
|
||||||
timestamp = datetime.fromtimestamp(timestamp)
|
timestamp = datetime.fromtimestamp(timestamp)
|
||||||
|
|
||||||
if duration != "NULL" and duration is not None:
|
if duration != "NULL" and duration is not None:
|
||||||
end_timedelta = timestamp + duration
|
end_timestamp = timestamp + duration
|
||||||
end_timestamp = int(end_timedelta.timestamp())
|
|
||||||
else:
|
else:
|
||||||
duration = None
|
duration = None
|
||||||
end_timestamp = None
|
end_timestamp = None
|
||||||
|
|
||||||
if not expired:
|
if not expired:
|
||||||
if timestamp.timestamp() > end_timestamp:
|
if timestamp > end_timestamp:
|
||||||
expired = True
|
expired = True
|
||||||
else:
|
else:
|
||||||
expired = False
|
expired = False
|
||||||
|
|
Loading…
Reference in a new issue