Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fdambrine committed Feb 24, 2018
1 parent 0071f5d commit 78d576a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zds/notification/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def mark_notification_read(self, content):
LOG.debug('nothing to mark as read')
return
elif len(notifications) > 1:
LOG.warning('%s notifications found for %s/%s', len(notifications), content.type, content.title)
content_type = getattr(content, 'type', 'forum')
content_title = getattr(content, 'title', 'message')
LOG.warning('%s notifications found for %s/%s', len(notifications), content_type, content_title)
for notif in notifications[1:]:
notif.delete()

Expand Down

0 comments on commit 78d576a

Please sign in to comment.