Browse Source

perf: tag export format use name:value style

pull/13592/head
ibuler 5 months ago committed by 老广
parent
commit
43cfb11bca
  1. 5
      apps/common/serializers/fields.py

5
apps/common/serializers/fields.py

@ -110,6 +110,11 @@ class LabelRelatedField(serializers.RelatedField):
kwargs["queryset"] = queryset
super().__init__(**kwargs)
def to_file_representation(self, value):
if value is None:
return value
return "{}:{}".format(value.get('name'), value.get('value'))
def to_representation(self, value):
if value is None:
return value

Loading…
Cancel
Save