Skip to content

Commit

Permalink
statusUpdateReporter: Check if exceptions are there
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithpabbati committed Jun 6, 2020
1 parent da06f3b commit d4202f3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions status/StatusUpdateReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,14 @@ def kickMembers(self):
if lastSend > thread.noOfDays:
kick = True
exceptions = StatusException.objects.filter(isPaused=True)
for exception in exceptions:
if member == exception.user:
if exception.start_date <= date.today() <= exception.end_date:
kick = False
break
else:
exception.isPaused = False
if exceptions:
for exception in exceptions:
if member == exception.user:
if exception.start_date <= date.today() <= exception.end_date:
kick = False
break
else:
exception.isPaused = False
if kick and status != "left":
shouldKick.append(member)
except:
Expand Down

0 comments on commit d4202f3

Please sign in to comment.