Fix syntax error in notification display causing redirect loop on login
This commit is contained in:
parent
0d3c94eca4
commit
24cae8a01b
1 changed files with 3 additions and 5 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue