mirror of https://github.com/jumpserver/jumpserver
fix: 过滤离线的发布机
parent
5d61d843f3
commit
f407bfd7b2
|
@ -112,7 +112,9 @@ class Applet(JMSBaseModel):
|
||||||
|
|
||||||
def select_host_account(self):
|
def select_host_account(self):
|
||||||
# 选择激活的发布机
|
# 选择激活的发布机
|
||||||
hosts = list(self.hosts.filter(is_active=True).all())
|
hosts = [item for item in self.hosts.filter(is_active=True).all()
|
||||||
|
if item.load != 'offline']
|
||||||
|
|
||||||
if not hosts:
|
if not hosts:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue