From 917a0d9481c7354820b20f2490b4e47c11dc1cfb Mon Sep 17 00:00:00 2001 From: Rohan Moniz <60864468+rm03@users.noreply.github.com> Date: Sat, 25 Nov 2023 23:17:54 -0500 Subject: [PATCH] nit --- backend/clubs/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/clubs/serializers.py b/backend/clubs/serializers.py index 56f5a851a..48fc8d84a 100644 --- a/backend/clubs/serializers.py +++ b/backend/clubs/serializers.py @@ -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!" )