Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
send_email: Use a consistent order when sending custom emails to users.
Alex Vandiver4f4627b79b61
diff --git a/zerver/lib/management.py b/zerver/lib/management.pyindex 36beef5c033..8f1b7c91f0e 100644--- a/zerver/lib/management.py+++ b/zerver/lib/management.py@@ -152,7 +152,9 @@ server via `ps -ef` or reading bash history. Preferif realm is not None:user_profiles = user_profiles.filter(realm=realm)email_matches = [Q(delivery_email__iexact=e) for e in emails]- user_profiles = user_profiles.filter(reduce(lambda a, b: a | b, email_matches))+ user_profiles = user_profiles.filter(reduce(lambda a, b: a | b, email_matches)).order_by(+ "id"+ )# Return the single query, for ease of composing.return user_profiles