Fix of the notification subscription
This commit is contained in:
+5
-3
@@ -10417,15 +10417,17 @@ def notifications_view():
|
||||
admin_notifications = []
|
||||
for notif in notifications:
|
||||
is_read = username in (notif.get('ReadBy') or [])
|
||||
created_at_val = notif.get('CreatedAt')
|
||||
|
||||
row = {
|
||||
'id': str(notif.get('_id')),
|
||||
'title': notif.get('Title', 'Benachrichtigung'),
|
||||
'message': notif.get('Message', ''),
|
||||
'severity': notif.get('Severity', 'info'),
|
||||
'type': notif.get('Type', ''),
|
||||
'created_at': notif.get('CreatedAt'),
|
||||
'type': notif.get('Type', '')
|
||||
'created_at': created_at_val if created_at_val else None,
|
||||
'is_read': is_read,
|
||||
'reference': notif.get('Reference', {}) or {},
|
||||
'reference': notif.get('Reference') or {},
|
||||
}
|
||||
if notif.get('Audience') == 'admin':
|
||||
admin_notifications.append(row)
|
||||
|
||||
Reference in New Issue
Block a user