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

Co-authored-by: feng <1304903146@qq.com>
pull/10710/head
fit2bot 2023-06-14 14:42:53 +08:00 committed by GitHub
parent de43df8370
commit 120f0dd3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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 = [