Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
sync_ldap_user_data: Pass realm as arg to select_related.
Sahil Batra63cc18a94b39
diff --git a/zerver/management/commands/sync_ldap_user_data.py b/zerver/management/commands/sync_ldap_user_data.pyindex 03b9ce114a0..a8a3bd259a8 100644--- a/zerver/management/commands/sync_ldap_user_data.py+++ b/zerver/management/commands/sync_ldap_user_data.py@@ -78,7 +78,7 @@ class Command(ZulipBaseCommand):realm = self.get_realm(options)user_profiles = self.get_users(options, realm, is_bot=False, include_deactivated=True)else:- user_profile_query = UserProfile.objects.select_related().filter(is_bot=False)+ user_profile_query = UserProfile.objects.select_related("realm").filter(is_bot=False)if not user_profile_query.exists():# This case provides a special error message if one