Serializers user signup: correctly handle EtebaseValidationErrors.
Don't coerce them to strings
This commit is contained in:
@@ -450,6 +450,8 @@ 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)
|
||||||
|
except EtebaseValidationError as e:
|
||||||
|
raise e
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise EtebaseValidationError('generic', str(e))
|
raise EtebaseValidationError('generic', str(e))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user