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:
notifications.append(notification)
if context.dicts[3]["exception"]:
if "exception" in context.dicts[3]:
exception = Notification()
exception.status = 2
exception.text = context.dicts[3]["exception"].human
if context.dicts[3]["user"].is_superuser:
exception.text += (
"<br><br><code>"
str(context.dicts[3]["exception"])
"</code>"
)
"<br><br><code>%s</code>" % str(context.dicts[3]["exception"])
)
notifications = [exception] + notifications
return {'notifications': notifications}