diff --git a/apps/applications/serializers/attrs/application_category/remote_app.py b/apps/applications/serializers/attrs/application_category/remote_app.py index 11042049e..bace9173b 100644 --- a/apps/applications/serializers/attrs/application_category/remote_app.py +++ b/apps/applications/serializers/attrs/application_category/remote_app.py @@ -34,7 +34,7 @@ class ExistAssetPrimaryKeyRelatedField(serializers.PrimaryKeyRelatedField): class RemoteAppSerializer(serializers.Serializer): asset_info = serializers.SerializerMethodField() asset = ExistAssetPrimaryKeyRelatedField( - queryset=Asset.objects, required=False, label=_("Asset"), allow_null=True + queryset=Asset.objects, required=True, label=_("Asset"), allow_null=True ) path = serializers.CharField( max_length=128, label=_('Application path'), allow_null=True @@ -42,7 +42,7 @@ class RemoteAppSerializer(serializers.Serializer): def validate_asset(self, asset): if not asset: - raise serializers.ValidationError(_('This field is required')) + raise serializers.ValidationError(_('This field is required.')) return asset @staticmethod diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index c8ce1bef4..2f75f059b 100644 Binary files a/apps/locale/zh/LC_MESSAGES/django.mo and b/apps/locale/zh/LC_MESSAGES/django.mo differ diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index d1b4a93af..f9bf84e0c 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -389,8 +389,8 @@ msgstr "应用路径" #: applications/serializers/attrs/application_category/remote_app.py:45 #: xpack/plugins/cloud/serializers.py:51 -msgid "This field is required" -msgstr "这个字段是必填项" +msgid "This field is required." +msgstr "该字段是必填项。" #: applications/serializers/attrs/application_type/chrome.py:17 #: applications/serializers/attrs/application_type/vmware_client.py:22