mirror of https://github.com/zulip/zulip.git
sessions: Don't filter by expire_date in delete_realm_user_sessions.
The other delete_... functions just do .all() - we should be consistent one way or another.
This commit is contained in:
parent
003d086f2e
commit
66d8c2ae15
|
@ -48,7 +48,7 @@ def delete_user_sessions(user_profile: UserProfile) -> None:
|
|||
|
||||
def delete_realm_user_sessions(realm: Realm) -> None:
|
||||
realm_user_ids = list(UserProfile.objects.filter(realm=realm).values_list("id", flat=True))
|
||||
for session in Session.objects.filter(expire_date__gte=timezone_now()):
|
||||
for session in Session.objects.all():
|
||||
if get_session_user(session) in realm_user_ids:
|
||||
delete_session(session)
|
||||
|
||||
|
|
Loading…
Reference in New Issue