elif for guardian code

This commit is contained in:
jain
2023-08-29 17:50:58 +05:30
parent a8d291474a
commit d4008d6cc2
+1 -1
View File
@@ -219,7 +219,7 @@ class AddJuniorAPIView(viewsets.ModelViewSet):
return False
if not junior.guardian_code:
junior.guardian_code = [guardian.guardian_code]
if type(junior.guardian_code) is list and len(junior.guardian_code) < 3:
elif type(junior.guardian_code) is list and len(junior.guardian_code) < 3:
junior.guardian_code.append(guardian.guardian_code)
else:
return "Max"