Use datetime.min instead of a fixed span for the last login default time.

This commit is contained in:
Jake Moshenko 2014-09-04 19:15:06 -04:00
parent bf3077f922
commit 1a230f635a

View file

@ -282,7 +282,7 @@ def require_fresh_login(func):
logger.debug('Checking fresh login for user %s', user.username)
last_login = session.get('login_time', datetime.datetime.now() - datetime.timedelta(minutes=60))
last_login = session.get('login_time', datetime.datetime.min)
valid_span = datetime.datetime.now() - datetime.timedelta(minutes=10)
if last_login >= valid_span: