Fix syntax error in notification display causing redirect loop on login

This commit is contained in:
Kumi 2019-04-25 14:06:41 +00:00
parent 0d3c94eca4
commit 24cae8a01b

View file

@ -17,15 +17,13 @@ def getNotifications(context, login=False):
if notification.on_login or not login: if notification.on_login or not login:
notifications.append(notification) notifications.append(notification)
if context.dicts[3]["exception"]: if "exception" in context.dicts[3]:
exception = Notification() exception = Notification()
exception.status = 2 exception.status = 2
exception.text = context.dicts[3]["exception"].human exception.text = context.dicts[3]["exception"].human
if context.dicts[3]["user"].is_superuser: if context.dicts[3]["user"].is_superuser:
exception.text += ( exception.text += (
"<br><br><code>" "<br><br><code>%s</code>" % str(context.dicts[3]["exception"])
str(context.dicts[3]["exception"])
"</code>"
) )
notifications = [exception] + notifications notifications = [exception] + notifications
return {'notifications': notifications} return {'notifications': notifications}