uploads: Remove display_recipient from fetched data.

This fixes a performance regression loading the Zulip homepage.

While it decreases the utility of the display of messages, it's only
so much loss (because the display recipient for PMs was totally broken
anyway).
This commit is contained in:
Tim Abbott 2017-02-19 22:14:38 -08:00
parent 620f1e444e
commit b231bf70eb
1 changed files with 1 additions and 2 deletions

View File

@ -1155,8 +1155,7 @@ class Attachment(ModelReprMixin, models.Model):
'path_id': self.path_id,
'messages': [{
'id': m.id,
'name': '{m.pub_date:%Y-%m-%d %H:%M} {recipient}/{m.subject}'.format(
recipient=get_display_recipient(m.recipient), m=m)
'name': '{m.pub_date:%Y-%m-%d %H:%M}'.format(m=m)
} for m in self.messages.all()]
}