From 24cae8a01b77a0269a5e0740703167ffd617437c Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 25 Apr 2019 14:06:41 +0000 Subject: [PATCH] Fix syntax error in notification display causing redirect loop on login --- manager/templatetags/notifications.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/manager/templatetags/notifications.py b/manager/templatetags/notifications.py index ebd2087..adbfa27 100644 --- a/manager/templatetags/notifications.py +++ b/manager/templatetags/notifications.py @@ -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 += ( - "

" - str(context.dicts[3]["exception"]) - "" - ) + "

%s" % str(context.dicts[3]["exception"]) + ) notifications = [exception] + notifications return {'notifications': notifications}