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.

message_send: Remove select_related call for stream.

Sahil Batradf01d0725cbf
diff --git a/zerver/actions/message_send.py b/zerver/actions/message_send.py
index 878f111a888..692207a9167 100644
--- a/zerver/actions/message_send.py
+++ b/zerver/actions/message_send.py
@@ -933,7 +933,7 @@ def do_send_messages(
if send_request.message.is_stream_message():
if send_request.stream is None:
stream_id = send_request.message.recipient.type_id
- send_request.stream = Stream.objects.select_related().get(id=stream_id)
+ send_request.stream = Stream.objects.get(id=stream_id)
# assert needed because stubs for django are missing
assert send_request.stream is not None
realm_id = send_request.stream.realm_id