Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
dev_login: Pass realm as arg to select_related calls.
Sahil Batra3ae0b4f91387
diff --git a/zerver/views/development/dev_login.py b/zerver/views/development/dev_login.pyindex 55213dc1bd7..38cfa318d86 100644--- a/zerver/views/development/dev_login.py+++ b/zerver/views/development/dev_login.py@@ -30,11 +30,13 @@ def get_dev_users(realm: Optional[Realm] = None, extra_users_count: int = 10) -># it still makes sense to limit how many extra users we render to# support performance testing with DevAuthBackend.if realm is not None:- users_query = UserProfile.objects.select_related().filter(+ users_query = UserProfile.objects.select_related("realm").filter(is_bot=False, is_active=True, realm=realm)else:- users_query = UserProfile.objects.select_related().filter(is_bot=False, is_active=True)+ users_query = UserProfile.objects.select_related("realm").filter(+ is_bot=False, is_active=True+ )shakespearian_users = users_query.exclude(email__startswith="extrauser").order_by("email")extra_users = users_query.filter(email__startswith="extrauser").order_by("email")