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