changeset 5141:9e36b8bf73b7

auth: avoid flash message with 'None' on login redirect Introduced in 4cad3a52e0ed.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 15 May 2015 23:40:44 +0200
parents 6e8effd028bf
children 12e6de3d7e29
files kallithea/lib/auth.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/auth.py	Wed May 13 15:13:16 2015 +0000
+++ b/kallithea/lib/auth.py	Fri May 15 23:40:44 2015 +0200
@@ -723,7 +723,8 @@
 def redirect_to_login(message=None):
     from kallithea.lib import helpers as h
     p = url.current()
-    h.flash(h.literal(message), category='warning')
+    if message:
+        h.flash(h.literal(message), category='warning')
     log.debug('Redirecting to login page, origin: %s' % p)
     return redirect(url('login_home', came_from=p))