mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 17:01:09 +00:00
perf: 修改 account (#10088)
* perf: 优化账号创建策略 * perf: 修改账号 * perf: 修改 account * perf: 修改 account * perf: 修改批量创建 * perf: 修改账号批量创建 * perf: 继续优化账号批量添加 * perf: 优化创建 accounts 的结果 * perf: 优化账号批量返回的格式 * perf: 优化账号 --------- Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -112,8 +112,10 @@ class Applet(JMSBaseModel):
|
||||
|
||||
def select_host_account(self):
|
||||
# 选择激活的发布机
|
||||
hosts = [item for item in self.hosts.filter(is_active=True).all()
|
||||
if item.load != 'offline']
|
||||
hosts = [
|
||||
host for host in self.hosts.filter(is_active=True)
|
||||
if host.load != 'offline'
|
||||
]
|
||||
|
||||
if not hosts:
|
||||
return None
|
||||
|
Reference in New Issue
Block a user