mirror of https://github.com/jumpserver/jumpserver
fix: 优化选择发布机
parent
7669744312
commit
e56a37afd2
|
@ -162,7 +162,7 @@ class Applet(JMSBaseModel):
|
|||
for host_id in using_host_ids.values():
|
||||
counts[host_id] += 1
|
||||
|
||||
hosts = list(sorted(hosts, key=lambda h: counts[h.id]))
|
||||
hosts = list(sorted(hosts, key=lambda h: counts[str(h.id)]))
|
||||
return hosts[0] if hosts else None
|
||||
|
||||
def select_host(self, user, asset):
|
||||
|
|
Loading…
Reference in New Issue