Sort messages before building a message list for emails.

Otherwise they sometimes appear out of order!

(imported from commit 26b71579b8f0c31ebdba0eef99afdf0e1772b676)
This commit is contained in:
Jessica McKellar
2013-12-13 13:34:41 -05:00
parent 4740bc7e3a
commit 67088b15a4

View File

@@ -1944,6 +1944,8 @@ def build_message_list(user_profile, messages):
# },
# ]
messages.sort(key=lambda message: message.pub_date)
for message in messages:
header = message_header(user_profile, message)