Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

users: Change bot owner only if needed.

Sahil Batracf14d8f611f6
diff --git a/zerver/views/users.py b/zerver/views/users.py
index 4e4838bcab7..615cb621897 100644
--- a/zerver/views/users.py
+++ b/zerver/views/users.py
@@ -357,7 +357,7 @@ def patch_bot_backend(
do_change_user_role(bot, role, acting_user=user_profile)
- if bot_owner_id is not None:
+ if bot_owner_id is not None and bot.bot_owner_id != bot_owner_id:
try:
owner = get_user_profile_by_id_in_realm(bot_owner_id, user_profile.realm)
except UserProfile.DoesNotExist: