Commit 808f3200 authored by Etienne Lachere's avatar Etienne Lachere Committed by Romain Bignon

[caissedepargne] ensure the possibility of a None browser_sate.expire

parent 94487368
......@@ -126,7 +126,7 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
del self.session.cookies['CTX']
def load_state(self, state):
if 'expire' in state and parser.parse(state['expire']) < datetime.datetime.now():
if state.get('expire') and parser.parse(state['expire']) < datetime.datetime.now():
return self.logger.info('State expired, not reloading it from storage')
# Reload session only for add recipient step
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment