Fakultas Ilmu Komputer UI

Commit 08369aac authored by Kefas Satrio Bangkit Solidedantyo's avatar Kefas Satrio Bangkit Solidedantyo

Merge branch 'fix-phone-no' into 'staging'

fixing phone number bug

See merge request !91
parents f1df7b78 e7512924
Pipeline #84403 passed with stages
in 14 minutes and 45 seconds
# Generated by Django 3.1 on 2021-06-29 13:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0002_auto_20210601_1536'),
]
operations = [
migrations.AlterField(
model_name='customuser',
name='deadline',
field=models.DateField(blank=True, null=True),
),
]
......@@ -76,7 +76,7 @@ class CustomUserDetailsSerializer(serializers.ModelSerializer):
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:
if (phone_number is None) or (phone_number == ""):
phone_number = instance.diet_questionnaire.handphone_no
result['phone_number'] = phone_number
return result
......
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