remove unnecessary models

This commit is contained in:
behruz-dev
2025-07-16 17:39:49 +05:00
parent 32469f4f46
commit 4bde93f3ed
8 changed files with 37 additions and 96 deletions

View File

@@ -66,7 +66,7 @@ class ChoiseRoleSerializer(serializers.Serializer):
def validate(self, data):
try:
user = User.objects.get(phone=data.get("phone"), is_active=False)
user = User.objects.get(phone=data.get("phone"), is_active=True)
except User.DoesNotExist:
raise serializers.ValidationError({"detail": "user not found"})
data['user'] = user