fix: 优化选择发布机

pull/11998/head
ibuler 2023-10-30 16:02:03 +08:00 committed by 老广
parent 7669744312
commit e56a37afd2
1 changed files with 1 additions and 1 deletions

View File

@ -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):