mirror of https://github.com/jumpserver/jumpserver
fix: 远程应用列表接口报错
parent
fc0891ceee
commit
4cfd1bc047
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue