Skip to content

Commit

Permalink
Fixed issue with password reset email
Browse files Browse the repository at this point in the history
  • Loading branch information
nasief committed May 3, 2018
1 parent 21b77b4 commit a028710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion accountsplus/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ def password_reset(request,
extra_email_context = extra_email_context or {}
try:
user = User.objects.get(email=email)
extra_email_context['email_lang'] = user.preferred_language or request.LANGUAGE_CODE
if not extra_email_context:
extra_email_context = dict()
extra_email_context['email_lang'] = user.preferred_language or request.LANGUAGE_CODE
except User.DoesNotExist:
pass

Expand Down

0 comments on commit a028710

Please sign in to comment.