mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
Update session_redis/session.py
Co-authored-by: Florent Xicluna <142113+florentx@users.noreply.github.com>
This commit is contained in:
co-authored by
GitHub
Florent Xicluna
parent
9dcbe33366
commit
7375585a5b
@@ -97,9 +97,8 @@ class RedisSessionStore(SessionStore):
|
||||
"utf-8"
|
||||
)
|
||||
if self.redis.set(key, data):
|
||||
if not isinstance(expiration, int):
|
||||
if not (expiration and isinstance(expiration, int)):
|
||||
expiration = DEFAULT_SESSION_TIMEOUT_ANONYMOUS
|
||||
if expiration == 0:
|
||||
expiration = DEFAULT_SESSION_TIMEOUT_ANONYMOUS
|
||||
return self.redis.expire(key, expiration)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user