Fakultas Ilmu Komputer UI

Commit 464e8b17 authored by Glenda Emanuella Sutanto's avatar Glenda Emanuella Sutanto
Browse files

Provided nutritionist data in user serializer

parent 5f097fed
Pipeline #83961 passed with stages
in 16 minutes and 6 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