mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
zerver/lib/actions.py: Fix return values.
This commit is contained in:
committed by
Tim Abbott
parent
dc060248b4
commit
a2b48f05e5
@@ -108,7 +108,7 @@ def bot_owner_userids(user_profile):
|
||||
user_profile.default_sending_stream and user_profile.default_sending_stream.invite_only or
|
||||
user_profile.default_events_register_stream and user_profile.default_events_register_stream.invite_only)
|
||||
if is_private_bot:
|
||||
return (user_profile.bot_owner_id,)
|
||||
return (user_profile.bot_owner_id,) # TODO: change this to list instead of tuple
|
||||
else:
|
||||
return active_user_ids(user_profile.realm)
|
||||
|
||||
@@ -290,7 +290,7 @@ def user_sessions(user_profile):
|
||||
if get_session_user(s) == user_profile.id]
|
||||
|
||||
def delete_session(session):
|
||||
return session_engine.SessionStore(session.session_key).delete()
|
||||
session_engine.SessionStore(session.session_key).delete()
|
||||
|
||||
def delete_user_sessions(user_profile):
|
||||
for session in Session.objects.all():
|
||||
@@ -475,8 +475,6 @@ def do_deactivate_stream(stream, log=True):
|
||||
streams=[stream_dict])
|
||||
send_event(event, active_user_ids(stream.realm))
|
||||
|
||||
return
|
||||
|
||||
def do_change_user_email(user_profile, new_email):
|
||||
old_email = user_profile.email
|
||||
user_profile.email = new_email
|
||||
@@ -1034,7 +1032,7 @@ def validate_user_access_to_subscribers(user_profile, stream):
|
||||
* The stream is invite only, requesting_user is passed, and that user
|
||||
does not subscribe to the stream.
|
||||
"""
|
||||
return validate_user_access_to_subscribers_helper(
|
||||
validate_user_access_to_subscribers_helper(
|
||||
user_profile,
|
||||
{"realm__domain": stream.realm.domain,
|
||||
"realm_id": stream.realm_id,
|
||||
|
||||
Reference in New Issue
Block a user