mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
fix(ops): 修复task run as的问题
This commit is contained in:
@@ -110,7 +110,7 @@ class JMSInventory(JMSBaseInventory):
|
||||
try:
|
||||
asset = self.assets.get(id=host.get('id'))
|
||||
manager = AssetUserManager()
|
||||
run_user = manager.get_latest(username=self.run_as, asset=asset)
|
||||
run_user = manager.get_latest(username=self.run_as, asset=asset, prefer='system_user')
|
||||
except Exception as e:
|
||||
logger.error(e, exc_info=True)
|
||||
return {}
|
||||
|
Reference in New Issue
Block a user