Serializers: fully clean an object on signup.

This commit is contained in:
Tom Hacohen 2020-12-22 12:46:42 +02:00
parent 3b4ba75930
commit 3fcea20d68

View File

@ -518,7 +518,7 @@ class AuthenticationSignupSerializer(BetterErrorsMixin, serializers.Serializer):
# Create the user and save the casing the user chose as the first name # Create the user and save the casing the user chose as the first name
try: try:
instance = create_user(**user_data, password=None, first_name=user_data["username"], view=view) instance = create_user(**user_data, password=None, first_name=user_data["username"], view=view)
instance.clean_fields() instance.full_clean()
except EtebaseValidationError as e: except EtebaseValidationError as e:
raise e raise e
except django_exceptions.ValidationError as e: except django_exceptions.ValidationError as e: