Skip to content

Commit

Permalink
always create the REMOVE_PHOTO alert but mark it resolved if there is…
Browse files Browse the repository at this point in the history
… no photo. Fixes #364
  • Loading branch information
jsayles committed Dec 3, 2020
1 parent 73bb66f commit 5b29c07
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nadine/models/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ def handle_ending_membership(self, user, target_date=None):
target_date = localtime(now())

# If they have a photo, take it down and stop nagging us to take one
MemberAlert.objects.create_if_not_open(user=user, key=MemberAlert.REMOVE_PHOTO)
if user.profile.photo:
user.profile.resolve_alerts(MemberAlert.POST_PHOTO)
MemberAlert.objects.create_if_not_open(user=user, key=MemberAlert.REMOVE_PHOTO)
else:
# We don't have a photo so this can be marked as resolved
user.profile.resolve_alerts(MemberAlert.REMOVE_PHOTO)

def handle_new_membership(self, user):
logger.debug("handle_new_membership: %s" % user)
Expand Down

0 comments on commit 5b29c07

Please sign in to comment.