From 7e3493a890b6ae8a74ec6296f3ebc8ba320d4a6d Mon Sep 17 00:00:00 2001 From: MJ Akbari Date: Sun, 22 Sep 2024 22:42:34 +0330 Subject: [PATCH] debug --- user/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/serializers.py b/user/serializers.py index 115c47e..4404adb 100644 --- a/user/serializers.py +++ b/user/serializers.py @@ -59,7 +59,7 @@ def get_state(self, obj): return obj.get_state_display() def get_payment_state(self, obj): - obj.get_payment_state() + return obj.get_payment_state() state = serializers.SerializerMethodField() payment_state = serializers.SerializerMethodField() @@ -69,7 +69,7 @@ def get_payment_state(self, obj): class Meta: model = Team fields = ['members', 'state', 'emails', 'name', 'pk', 'payment_state'] - extra_kwargs = {'pk': {'read_only': True}} + extra_kwargs = {'pk': {'read_only': True}, 'payment_state': {'read_only': True}} def create(self, validated_data): val = deepcopy(validated_data)