mirror of https://github.com/jumpserver/jumpserver
fix: 修复 连接远程应用时标签匹配失败的问题
parent
6ac956c626
commit
3e090eb701
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue