mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
changes in requirement file
This commit is contained in:
@ -61,15 +61,6 @@ class CreateJuniorSerializer(serializers.ModelSerializer):
|
||||
"""Create junior profile"""
|
||||
image = validated_data.get('image', None)
|
||||
guardian_code = validated_data.get('guardian_code',None)
|
||||
print("guardian_code===>",guardian_code,'==>',type(guardian_code))
|
||||
|
||||
|
||||
|
||||
# phone_number = validated_data.get('phone', None)
|
||||
# guardian_data = Guardian.objects.filter(phone=phone_number)
|
||||
# junior_data = Junior.objects.filter(phone=phone_number)
|
||||
# if phone_number and (junior_data or guardian_data):
|
||||
# raise serializers.ValidationError({"details":ERROR_CODE['2012']})
|
||||
user = User.objects.filter(username=self.context['user']).last()
|
||||
if user:
|
||||
"""Save first and last name of junior"""
|
||||
@ -167,7 +158,6 @@ class JuniorDetailListSerializer(serializers.ModelSerializer):
|
||||
return obj.auth.last_name
|
||||
|
||||
def get_assigned_task(self, obj):
|
||||
print("obj===>",obj,'type==>',type(obj))
|
||||
data = JuniorTask.objects.filter(junior=obj).count()
|
||||
return data
|
||||
|
||||
|
Reference in New Issue
Block a user