Browse Source

perf: asset web autofill 添加LabeledChoiceField (#10706)

Co-authored-by: feng <1304903146@qq.com>
pull/10710/head
fit2bot 1 year ago committed by GitHub
parent
commit
120f0dd3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/assets/serializers/asset/info/spec.py

4
apps/assets/serializers/asset/info/spec.py

@ -1,6 +1,9 @@
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from assets.const.web import FillType
from assets.models import Database, Web
from common.serializers.fields import LabeledChoiceField
class DatabaseSpecSerializer(serializers.ModelSerializer):
@ -10,6 +13,7 @@ class DatabaseSpecSerializer(serializers.ModelSerializer):
class WebSpecSerializer(serializers.ModelSerializer):
autofill = LabeledChoiceField(choices=FillType.choices, label=_('Autofill'))
class Meta:
model = Web
fields = [

Loading…
Cancel
Save