mirror of https://github.com/jumpserver/jumpserver
fix: 修复创建/更新远程应用资产可以为空的问题
parent
0c8c926aac
commit
b7378da46e
|
@ -40,6 +40,11 @@ class RemoteAppSerializer(serializers.Serializer):
|
||||||
max_length=128, label=_('Application path'), allow_null=True
|
max_length=128, label=_('Application path'), allow_null=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def validate_asset(self, asset):
|
||||||
|
if not asset:
|
||||||
|
raise serializers.ValidationError(_('This field is required'))
|
||||||
|
return asset
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_asset_info(obj):
|
def get_asset_info(obj):
|
||||||
asset_id = obj.get('asset')
|
asset_id = obj.get('asset')
|
||||||
|
|
Loading…
Reference in New Issue