Skip to content

Commit

Permalink
Match email with iexact filter for a change request (#2537)
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav authored Feb 12, 2025
1 parent a52c9b5 commit 0e74a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class ChangeEmailRequestUpdateSerializer(serializers.ModelSerializer):
@transaction.atomic
def update(self, instance, validated_data):
"""Updates an email change request"""
if User.objects.filter(email=instance.new_email).exists():
if User.objects.filter(email__iexact=instance.new_email).exists():
log.debug(
"User %s tried to change email address to one already in use", instance
)
Expand Down

0 comments on commit 0e74a92

Please sign in to comment.