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:
Sahil Batra
2023-08-23 12:14:02 +05:30
committed by Tim Abbott
parent e9a6f69849
commit 5a8416ff6a
2 changed files with 2 additions and 2 deletions

View File

@@ -2989,7 +2989,7 @@ class Message(AbstractMessage):
search_tsvector = SearchVectorField(null=True)
DEFAULT_SELECT_RELATED = ["sender", "sender__realm", "realm", "recipient", "sending_client"]
DEFAULT_SELECT_RELATED = ["sender", "realm", "recipient", "sending_client"]
def topic_name(self) -> str:
"""