From e31bdff708818b80d6ed299d2f7abb2e7511dcf3 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 5 Oct 2016 17:51:22 +0000 Subject: [PATCH] Apply string operations on the string, not on the Email object. - Legacy-Id: 12092 --- ietf/community/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/community/forms.py b/ietf/community/forms.py index 1398b7110..4275bf1fb 100644 --- a/ietf/community/forms.py +++ b/ietf/community/forms.py @@ -106,7 +106,8 @@ class SubscriptionForm(forms.ModelForm): self.fields["email"].initial = self.fields["email"].queryset[0] def clean_email(self): - return self.cleaned_data["email"].strip().lower() + self.cleaned_data["email"].address = self.cleaned_data["email"].address.strip().lower() + return self.cleaned_data["email"] def clean(self): if EmailSubscription.objects.filter(community_list=self.clist, email=self.cleaned_data["email"], notify_on=self.cleaned_data["notify_on"]).exists():