mirror of https://github.com/zulip/zulip.git
emails: Fix notify_new_login emails have unserializable context.
Regression introduced in e0f30d0
(PR #7569).
This commit is contained in:
parent
c2847669b1
commit
e62d9742aa
|
@ -10,7 +10,7 @@
|
|||
<p><b>Login details:</b></p>
|
||||
<blockquote>
|
||||
<p>Server: <a href="{{ realm_uri }}" target="_blank">{{ realm_uri }}</a></p>
|
||||
<p>Account: <a href="mailto:{{ user.email }}" target="_blank">{{ user.email }}</a></p>
|
||||
<p>Account: <a href="mailto:{{ user_email }}" target="_blank">{{ user_email }}</a></p>
|
||||
<p>Time: {{ device_info.login_time }}</p>
|
||||
<p>Device: {{ device_info.device_browser if device_info.device_browser else 'An unknown browser' }} on {{ device_info.device_os if device_info.device_os else 'an unknown operating system' }}.</p>
|
||||
<p>IP Address: {{ device_info.device_ip }}</p>
|
||||
|
|
|
@ -4,7 +4,7 @@ This is a notification that a new login to your Zulip account has just occurred.
|
|||
|
||||
Login details:
|
||||
Server: {{ realm_uri }}
|
||||
Account: {{ user.email }}
|
||||
Account: {{ user_email }}
|
||||
Time: {{ device_info.login_time }}
|
||||
Device: {{ device_info.device_browser if device_info.device_browser else 'an unknown browser' }} on {{ device_info.device_os if device_info.device_os else 'an unknown operating system' }}.
|
||||
IP Address: {{ device_info.device_ip }}
|
||||
|
|
|
@ -81,7 +81,7 @@ def email_on_new_login(sender: Any, user: UserProfile, request: Any, **kwargs: A
|
|||
|
||||
context = common_context(user)
|
||||
context['device_info'] = device_info
|
||||
context['user'] = user
|
||||
context['user_email'] = user.email
|
||||
|
||||
email_dict = {
|
||||
'template_prefix': 'zerver/emails/notify_new_login',
|
||||
|
|
Loading…
Reference in New Issue