Skip to content

Commit

Permalink
fix: changed the error message from custom_auth serializer (#3924)
Browse files Browse the repository at this point in the history
Signed-off-by: Utkarsh Tripathi <utripathi2002@gmail.com>
  • Loading branch information
utkarsh-1905 committed May 14, 2024
1 parent 7e1617f commit 185bd6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/custom_auth/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Meta(UserCreateSerializer.Meta):
UniqueValidator(
queryset=FFAdminUser.objects.all(),
lookup="iexact",
message="Invalid email address.",
message="Email already exists. Please log in.",
)
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_CustomUserCreateSerializer_does_case_insensitive_lookup_with_email(db):

# When
assert serializer.is_valid() is False
assert serializer.errors["email"][0] == "Invalid email address."
assert serializer.errors["email"][0] == "Email already exists. Please log in."


def test_CustomUserCreateSerializer_calls_is_authentication_method_valid_correctly_if_auth_controller_is_installed(
Expand Down

0 comments on commit 185bd6a

Please sign in to comment.