Optimized SessionBase.get_expire_at_browser_close().
This commit is contained in:
parent
436862787c
commit
c920387fab
|
@ -275,9 +275,9 @@ class SessionBase:
|
||||||
``get_expiry_date()`` or ``get_expiry_age()`` to find the actual expiry
|
``get_expiry_date()`` or ``get_expiry_age()`` to find the actual expiry
|
||||||
date/age, if there is one.
|
date/age, if there is one.
|
||||||
"""
|
"""
|
||||||
if self.get('_session_expiry') is None:
|
if (expiry := self.get('_session_expiry')) is None:
|
||||||
return settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
|
return settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
|
||||||
return self.get('_session_expiry') == 0
|
return expiry == 0
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue