mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
We can directly get the realm object from Message object now and there is no need to get the realm object from "sender" field of Message object. After this change, we would not need to fetch "sender__realm" field using "select_related" and instead only passing "realm" to select_related when querying Message objects would be enough. This commit also updates a couple of cases to directly access realm ID from message object and not message.sender. Although we have fetched sender object already, so accessing realm_id from message directly or from message.sender should not matter, but we can be consistent to directly get realm from Message object whenever possible.
3.1 KiB
3.1 KiB