fix: 远程应用列表接口报错

pull/12714/head
wangruidong 2024-02-23 16:45:23 +08:00 committed by Bryan
parent fc0891ceee
commit 4cfd1bc047
1 changed files with 6 additions and 2 deletions

View File

@ -120,8 +120,12 @@ class AppletViewSet(DownloadUploadMixin, JMSBulkModelViewSet):
@staticmethod
def read_manifest_with_i18n(obj, lang='zh'):
with open(os.path.join(obj.path, 'manifest.yml'), encoding='utf8') as f:
manifest = yaml_load_with_i18n(f, lang)
path = os.path.join(obj.path, 'manifest.yml')
if os.path.exists(path):
with open(path, encoding='utf8') as f:
manifest = yaml_load_with_i18n(f, lang)
else:
manifest = {}
return manifest
def trans_queryset(self, queryset):