Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
models: Move the assertion checking bot_owner_id.
Zixuan James Li4493f74507f9
diff --git a/zerver/models.py b/zerver/models.pyindex 98cd9dba126..30762af60b4 100644--- a/zerver/models.py+++ b/zerver/models.py@@ -3806,8 +3806,8 @@ def bot_owner_user_ids(user_profile: UserProfile) -> Set[int]:or user_profile.default_events_register_streamand user_profile.default_events_register_stream.invite_only)+ assert user_profile.bot_owner_id is not Noneif is_private_bot:- assert user_profile.bot_owner_id is not Nonereturn {user_profile.bot_owner_id}else:users = {user.id for user in user_profile.realm.get_human_admin_users()}