From b231bf70eb4df15204b867172f4e4fce1e0d09e3 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 19 Feb 2017 22:14:38 -0800 Subject: [PATCH] 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). --- zerver/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zerver/models.py b/zerver/models.py index a1c2f680b5..122a229026 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -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()] }