Merge pull request #9674 from jumpserver/pr@dev@fix_applethost

fix: 未激活的发布机,将无法使用
This commit is contained in:
Eric_Lee 2023-02-21 22:28:10 +08:00 committed by GitHub
commit d2deaf10d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,8 @@ class Applet(JMSBaseModel):
return instance
def select_host_account(self):
hosts = list(self.hosts.all())
# 选择激活的发布机
hosts = list(self.hosts.filter(is_active=True).all())
if not hosts:
return None