Skip to content

Commit e31bdff

Browse files
committed
Apply string operations on the string, not on the Email object.
- Legacy-Id: 12092
1 parent 236fb3e commit e31bdff

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/community/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ def __init__(self, user, clist, *args, **kwargs):
106106
self.fields["email"].initial = self.fields["email"].queryset[0]
107107

108108
def clean_email(self):
109-
return self.cleaned_data["email"].strip().lower()
109+
self.cleaned_data["email"].address = self.cleaned_data["email"].address.strip().lower()
110+
return self.cleaned_data["email"]
110111

111112
def clean(self):
112113
if EmailSubscription.objects.filter(community_list=self.clist, email=self.cleaned_data["email"], notify_on=self.cleaned_data["notify_on"]).exists():

0 commit comments

Comments
 (0)