mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 00:59:15 +02:00
See #248: ensure invitation codes are case insensitive
This commit is contained in:
parent
7cfa61292a
commit
46ecc3f103
4 changed files with 4 additions and 4 deletions
|
@ -146,7 +146,7 @@ class ManageInvitationSerializer(serializers.ModelSerializer):
|
|||
def validate_code(self, value):
|
||||
if not value:
|
||||
return value
|
||||
if users_models.Invitation.objects.filter(code=value.lower()).exists():
|
||||
if users_models.Invitation.objects.filter(code__iexact=value).exists():
|
||||
raise serializers.ValidationError(
|
||||
"An invitation with this code already exists"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue