Fakultas Ilmu Komputer UI

Commit 4559aab5 authored by Ami's avatar Ami
Browse files

improving pylint score

parent 61dc2aef
Pipeline #84143 passed with stages
in 16 minutes and 9 seconds
......@@ -59,7 +59,7 @@ class CustomUserDetailsSerializer(serializers.ModelSerializer):
if instance.is_staff:
result['role'] = 'admin'
onboarding_status = UserAuthSerializer(instance).data
if onboarding_status['is_finished_onboarding'] == True\
if onboarding_status['is_finished_onboarding'] is True\
and 'role' in onboarding_status:
phone_number = instance.diet_questionnaire.whatsapp_no
if phone_number is None:
......
......@@ -44,7 +44,7 @@ class GetProfilesViewSet(generics.ListAPIView):
response = []
for user in queryset:
onboarding_status = UserAuthSerializer(user).data
if onboarding_status['is_finished_onboarding'] == True\
if onboarding_status['is_finished_onboarding'] is True\
and onboarding_status['role']=="client":
response.append({
'user': CustomUserDetailsSerializer(user).data,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment