mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
message: Do not pass "sender__realm" to select_related.
We have modified the code to directly fetch realm from Message object instead of "sender" field and thus we no longer need to fetch "sender__realm" using select_related.
This commit is contained in:
@@ -598,7 +598,7 @@ class MessageDict:
|
||||
# of going to the DB here should be overshadowed by the cost of rendering
|
||||
# and updating the row.
|
||||
# TODO: see #1379 to eliminate Markdown dependencies
|
||||
message = Message.objects.select_related("sender", "sender__realm").get(id=message_id)
|
||||
message = Message.objects.select_related("sender").get(id=message_id)
|
||||
|
||||
assert message is not None # Hint for mypy.
|
||||
# It's unfortunate that we need to have side effects on the message
|
||||
|
||||
Reference in New Issue
Block a user