mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-01 22:58:59 +00:00
fix(command): 修复批量命令执行可能获取到host为None的问题
This commit is contained in:
parent
cbcefe8bd3
commit
cf1fbabca1
@ -78,7 +78,7 @@ class CommandExecution(OrgModelMixin):
|
||||
runner = CommandRunner(self.inventory)
|
||||
try:
|
||||
host = self.hosts.first()
|
||||
if host.is_windows():
|
||||
if host and host.is_windows():
|
||||
shell = 'win_shell'
|
||||
else:
|
||||
shell = 'shell'
|
||||
|
Loading…
Reference in New Issue
Block a user