mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-03 15:33:32 +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)
|
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
Block a user