Use datetime.min instead of a fixed span for the last login default time.
This commit is contained in:
parent
bf3077f922
commit
1a230f635a
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Reference in a new issue