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.

populate_db: Limit user_profiles for private messages to zulip realm.

Mateusz Mandera0799ec1a4389
diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.py
index 2b0f3134c26..ea8bee8da3a 100644
--- a/zilencer/management/commands/populate_db.py
+++ b/zilencer/management/commands/populate_db.py
@@ -764,7 +764,9 @@ class Command(BaseCommand):
]
# Extract a list of all users
- user_profiles: List[UserProfile] = list(UserProfile.objects.filter(is_bot=False))
+ user_profiles: List[UserProfile] = list(
+ UserProfile.objects.filter(is_bot=False, realm=zulip_realm)
+ )
# Create a test realm emoji.
IMAGE_FILE_PATH = static_path("images/test-images/checkbox.png")