Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add an explanation comment in code

Marcin Gębalae5459f2f74e0
diff --git a/saleor/account/forms.py b/saleor/account/forms.py
index aeb6c17155..8aa8026316 100644
--- a/saleor/account/forms.py
+++ b/saleor/account/forms.py
@@ -113,5 +113,8 @@ class PasswordResetForm(django_forms.PasswordResetForm):
def send_mail(
self, subject_template_name, email_template_name, context,
from_email, to_email, html_email_template_name=None):
+ # Passing the user object to the Celery task throws an
+ # error "'User' is not JSON serializable". Since it's not used in our
+ # template, we remove it from the context.
del context['user']
emails.send_password_reset_email.delay(context, to_email)