Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
rm03 committed Nov 26, 2023
1 parent e5333d9 commit 917a0d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/clubs/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2476,14 +2476,14 @@ def validate(self, data):
if not application:
raise serializers.ValidationError("Invalid application id!")

application_exists = ApplicationExtension.objects.filter(
extension_exists = ApplicationExtension.objects.filter(
user=user, application=application
).exists()
modify_username = not self.instance or (
username and self.instance.user.username != username
)

if modify_username and application_exists:
if modify_username and extension_exists:
raise serializers.ValidationError(
"An extension for this user and application already exists!"
)
Expand Down

0 comments on commit 917a0d9

Please sign in to comment.