From 442adfaff3b9e950e40e5bd82df4070a7f027fe6 Mon Sep 17 00:00:00 2001 From: PIG208 <359101898@qq.com> Date: Sat, 24 Jul 2021 21:36:32 +0800 Subject: [PATCH] sessions: Use SessionBase instead of Session. --- zerver/lib/sessions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/sessions.py b/zerver/lib/sessions.py index 970e8f97a1..00eab8b210 100644 --- a/zerver/lib/sessions.py +++ b/zerver/lib/sessions.py @@ -71,14 +71,14 @@ def delete_all_deactivated_user_sessions() -> None: def set_expirable_session_var( - session: Session, var_name: str, var_value: Any, expiry_seconds: int + session: SessionBase, var_name: str, var_value: Any, expiry_seconds: int ) -> None: expire_at = datetime_to_timestamp(timezone_now() + timedelta(seconds=expiry_seconds)) session[var_name] = {"value": var_value, "expire_at": expire_at} def get_expirable_session_var( - session: Session, var_name: str, default_value: Any = None, delete: bool = False + session: SessionBase, var_name: str, default_value: Any = None, delete: bool = False ) -> Any: if var_name not in session: return default_value