fix: 修复 连接远程应用时标签匹配失败的问题

pull/12426/head
Bai 2023-12-25 19:19:11 +08:00 committed by Bryan
parent 6ac956c626
commit 3e090eb701
1 changed files with 3 additions and 2 deletions

View File

@ -172,8 +172,9 @@ class Applet(JMSBaseModel):
return None
spec_label = asset.labels.filter(label__name__in=['AppletHost', '发布机']).first()
if spec_label:
matched = [host for host in hosts if host.name == spec_label.value]
if spec_label and spec_label.label:
label_value = spec_label.label.value
matched = [host for host in hosts if host.name == label_value]
if matched:
return matched[0]