Changes of local part was properly blocked with an error message.
Changing the local domain was blocked but then caused an exception
further down the code.
This has been broken since forever, clearly not something people have
tried, but of course still worth fixing.
def clean(self):
if 'local_part' not in self.cleaned_data:
return {}
+ if 'local_domain' not in self.cleaned_data:
+ return {}
# Validate that the pattern is allowed
curs = connection.cursor()
def clean(self):
if 'local_part' not in self.cleaned_data:
return {}
+ if 'local_domain' not in self.cleaned_data:
+ return {}
# Validate that the pattern is allowed
curs = connection.cursor()