ValidationError when saving completed membership registration
One-sentence description
Current behaviour / Reproducing the bug
Click save while observing a completed registration.
Sentry Issue: CONCREXIT-4
ValueError: 'RegistrationForm' has no field named 'email'.
(14 additional frame(s) were not displayed)
...
File "django/forms/forms.py", line 180, in errors
self.full_clean()
File "django/forms/forms.py", line 383, in full_clean
self._post_clean()
File "django/forms/models.py", line 405, in _post_clean
self._update_errors(e)
File "django/forms/models.py", line 379, in _update_errors
self.add_error(None, errors)
File "django/forms/forms.py", line 353, in add_error
"'%s' has no field named '%s'." % (self.__class__.__name__, field))
ValidationError: {'email': ['A user with that email address already exists. Login using the existing account and renew the membership by visiting the account settings.'], 'student_number': ['A user with that student number already exists. Login using the existing account and renew the membership by visiting the account settings.'], 'username': ['A user with that username already exists.']}
File "django/forms/models.py", line 403, in _post_clean
self.instance.full_clean(exclude=exclude, validate_unique=False)
File "django/db/models/base.py", line 1152, in full_clean
raise ValidationError(errors)
Expected behaviour
No crash, maybe even no save button available.