mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
perf: 数据库资产 默认数据库 是必填项
This commit is contained in:
@@ -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 = [
|
||||
|
Reference in New Issue
Block a user