|
@@ -192,7 +192,7 @@ class Application(object):
|
|
|
else:
|
|
else:
|
|
|
user = password = None
|
|
user = password = None
|
|
|
|
|
|
|
|
- last_allowed = False
|
|
|
|
|
|
|
+ last_allowed = None
|
|
|
calendars = []
|
|
calendars = []
|
|
|
for calendar in items:
|
|
for calendar in items:
|
|
|
if not isinstance(calendar, ical.Calendar):
|
|
if not isinstance(calendar, ical.Calendar):
|
|
@@ -222,7 +222,7 @@ class Application(object):
|
|
|
# Calendars found
|
|
# Calendars found
|
|
|
status, headers, answer = function(
|
|
status, headers, answer = function(
|
|
|
environ, calendars, content, user)
|
|
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
|
|
# Good user and no calendars found, redirect user to home
|
|
|
location = "/%s/" % str(quote(user))
|
|
location = "/%s/" % str(quote(user))
|
|
|
log.LOGGER.info("redirecting to %s" % location)
|
|
log.LOGGER.info("redirecting to %s" % location)
|