emails: Pass realm_name instead of realm in notify_change_in_email context.

This commit is contained in:
Vishnu Ks 2018-04-30 21:05:21 +05:30
parent 23e82315b5
commit 69b0783b35
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
Zulip email changed for {{ realm.name }}
Zulip email changed for {{ realm_name }}

View File

@ -40,7 +40,7 @@ def confirm_email_change(request: HttpRequest, confirmation_key: str) -> HttpRes
raise JsonableError(_("Email address changes are disabled in this organization."))
do_change_user_email(user_profile, new_email)
context = {'realm': user_profile.realm, 'new_email': new_email}
context = {'realm_name': user_profile.realm.name, 'new_email': new_email}
send_email('zerver/emails/notify_change_in_email', to_email=old_email,
from_name="Zulip Account Security", from_address=FromAddress.SUPPORT,
context=context)