Fakultas Ilmu Komputer UI

Commit 8668c02f authored by Glenda Emanuella Sutanto's avatar Glenda Emanuella Sutanto
Browse files

Merge branch 'provide-nutritionist-detail-in-user-serializer' into 'staging'

Provided nutritionist data in user serializer

See merge request !84
parents 5f097fed 464e8b17
Pipeline #83970 passed with stages
in 25 minutes and 48 seconds
......@@ -34,6 +34,14 @@ class UserAuthSerializer(serializers.ModelSerializer):
result['transaction_status'] = last_active_cart.transaction_status
result['cart_id'] = last_active_cart.id
result['nutritionist'] = None
if instance.nutritionist is not None:
result['nutritionist'] = {
'full_name_and_degree': instance.nutritionist.full_name_and_degree,
'phone_number': instance.nutritionist.phone_number
return result
class Meta:
Supports Markdown
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