notifications: add new_notifications to context variables (#17111)
This commit is contained in:
parent
71f0dd7b14
commit
bf9a54b8dc
|
@ -123,6 +123,7 @@ class NotificationsCell(CellBase):
|
|||
if user and user.is_authenticated():
|
||||
extra_context['notifications'] = Notification.objects.filter(user=user,
|
||||
start_timestamp__lte=now(), end_timestamp__gt=now()).order_by('-start_timestamp')
|
||||
extra_context['new_notifications'] = extra_context['notifications'].filter(acked=False)
|
||||
return extra_context
|
||||
|
||||
def get_badge(self, context):
|
||||
|
|
Loading…
Reference in New Issue