models: Add ScheduledEmail.realm.

The two extra queries in the test are due to the assert in
send_future_email.
This commit is contained in:
Rishi Gupta
2017-12-04 18:19:48 -08:00
committed by Greg Price
parent cc08becb2c
commit 869b4d41ef
9 changed files with 71 additions and 11 deletions

View File

@@ -255,6 +255,6 @@ def handle_digest_email(user_profile_id: int, cutoff: float) -> None:
new_streams_count, new_users_count):
logger.info("Sending digest email for %s" % (user_profile.email,))
# Send now, as a ScheduledEmail
send_future_email('zerver/emails/digest', to_user_id=user_profile.id,
send_future_email('zerver/emails/digest', user_profile.realm, to_user_id=user_profile.id,
from_name="Zulip Digest", from_address=FromAddress.NOREPLY,
context=context)