fix: 修复远程应用无资产下载xrdp file 500 问题

pull/8076/head
feng626 2022-04-18 11:31:53 +08:00 committed by Jiangjie.Bai
parent a647e73c02
commit 10c146b07d
1 changed files with 2 additions and 3 deletions

View File

@ -288,15 +288,14 @@ class Application(CommonModelMixin, OrgModelMixin, ApplicationTreeNodeMixin):
raise ValueError("Remote App not has asset attr")
def get_target_ip(self):
target_ip = ''
if self.category_remote_app:
asset = self.get_remote_app_asset()
target_ip = asset.ip
target_ip = asset.ip if asset else target_ip
elif self.category_cloud:
target_ip = self.attrs.get('cluster')
elif self.category_db:
target_ip = self.attrs.get('host')
else:
target_ip = ''
return target_ip