mirror of https://github.com/jumpserver/jumpserver
perf: 数据库资产 默认数据库 是必填项
parent
ebb0e796ce
commit
b98aa377b6
|
@ -1,5 +1,6 @@
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from rest_framework.serializers import ValidationError
|
||||
from rest_framework import serializers
|
||||
|
||||
from assets.models import Database
|
||||
from assets.serializers.gateway import GatewayWithAccountSecretSerializer
|
||||
|
@ -9,6 +10,8 @@ __all__ = ['DatabaseSerializer', 'DatabaseWithGatewaySerializer']
|
|||
|
||||
|
||||
class DatabaseSerializer(AssetSerializer):
|
||||
db_name = serializers.CharField(max_length=1024, label=_('Default database'), required=True)
|
||||
|
||||
class Meta(AssetSerializer.Meta):
|
||||
model = Database
|
||||
extra_fields = [
|
||||
|
|
Loading…
Reference in New Issue