mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
logout api and sonar
This commit is contained in:
@ -93,7 +93,7 @@ class CreateJuniorSerializer(serializers.ModelSerializer):
|
||||
"""Complete profile of the junior if below all data are filled"""
|
||||
complete_profile_field = all([junior.phone, junior.gender, junior.country_name, junior.image,
|
||||
junior.dob, junior.country_code, user.first_name, user.last_name,
|
||||
user.email])
|
||||
user.email, junior.passcode])
|
||||
junior.is_complete_profile = False
|
||||
if complete_profile_field:
|
||||
junior.is_complete_profile = True
|
||||
@ -224,12 +224,12 @@ class JuniorProfileSerializer(serializers.ModelSerializer):
|
||||
|
||||
def get_total_count(self, obj):
|
||||
"""total fields count"""
|
||||
return 9
|
||||
return 10
|
||||
|
||||
def get_complete_field_count(self, obj):
|
||||
"""total filled fields count"""
|
||||
field_list = [obj.auth.first_name, obj.auth.last_name, obj.auth.email, obj.country_name, obj.country_code,
|
||||
obj.phone, obj.gender, obj.dob, obj.image]
|
||||
obj.phone, obj.gender, obj.dob, obj.image, obj.passcode]
|
||||
complete_field = [data for data in field_list if data is not None and data != '']
|
||||
return len(complete_field)
|
||||
class Meta(object):
|
||||
|
Reference in New Issue
Block a user