From 5f26c131a9b0d07412e8bdd32a628e42887deb12 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 21 Aug 2011 16:30:59 +0200 Subject: [PATCH] Redirect authenticated users with no calendar found --- radicale/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 27a5588b..22339461 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -192,7 +192,7 @@ class Application(object): else: user = password = None - last_allowed = False + last_allowed = None calendars = [] for calendar in items: if not isinstance(calendar, ical.Calendar): @@ -222,7 +222,7 @@ class Application(object): # Calendars found status, headers, answer = function( environ, calendars, content, user) - elif user and last_allowed: + elif user and last_allowed is None: # Good user and no calendars found, redirect user to home location = "/%s/" % str(quote(user)) log.LOGGER.info("redirecting to %s" % location)