mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-19 09:16:57 +00:00
fix: 优化选择发布机
This commit is contained in:
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
Block a user