Skip to content

Commit

Permalink
Fix punishment time bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AlberLC committed Jun 27, 2022
1 parent 802100e commit afc29b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multibot/models/punishments.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def punish(self, punishment_method: Callable, unpunishment_method: Callabl
raise e
else:
self.save()
if datetime.timedelta() < self.time <= constants.TIME_THRESHOLD_TO_MANUAL_UNPUNISH:
if self.time is not None and datetime.timedelta() <= self.time <= constants.TIME_THRESHOLD_TO_MANUAL_UNPUNISH:
await flanautils.do_later(self.time, self.check_olds, unpunishment_method, self.platform)

async def unpunish(self, unpunishment_method: Callable, message: Message = None):
Expand Down

0 comments on commit afc29b5

Please sign in to comment.