Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
minor: Move context code down in the function.
Steve Howell428f0564a07d
diff --git a/zerver/lib/digest.py b/zerver/lib/digest.pyindex aa9a0774e3a..94c36898825 100644--- a/zerver/lib/digest.py+++ b/zerver/lib/digest.py@@ -233,12 +233,6 @@ def bulk_get_digest_context(users: List[UserProfile], cutoff: float) -> Dict[intstream_map = get_stream_map(user_ids)for user in users:- context = common_context(user)-- # Start building email template data.- unsubscribe_link = one_click_unsubscribe_link(user, "digest")- context.update(unsubscribe_link=unsubscribe_link)-stream_ids = stream_map[user.id]if user.long_term_idle:@@ -247,6 +241,12 @@ def bulk_get_digest_context(users: List[UserProfile], cutoff: float) -> Dict[intrecent_topics = get_recent_topics(sorted(list(stream_ids)), cutoff_date)hot_topics = get_hot_topics(recent_topics)+ context = common_context(user)++ # Start building email template data.+ unsubscribe_link = one_click_unsubscribe_link(user, "digest")+ context.update(unsubscribe_link=unsubscribe_link)+# Get context data for hot conversations.context["hot_conversations"] = [hot_topic.teaser_data(user)