value2 dict bug
This commit is contained in:
parent
33eb8ffbc7
commit
54c7d7719d
|
|
@ -167,6 +167,7 @@ class QActionDetailSerializer(serializers.ModelSerializer):
|
|||
|
||||
def get_value2(self, obj):
|
||||
value2 = obj.value2
|
||||
if isinstance(value2, dict):
|
||||
if value2.get('province', None):
|
||||
value2['province_name'] = Province.objects.get(id=value2['province']).name
|
||||
if value2.get('city', None):
|
||||
|
|
|
|||
Loading…
Reference in New Issue