fix: account_prefer

This commit is contained in:
wangruidong
2025-04-09 11:17:47 +08:00
committed by w940853815
parent bbeadf7dbe
commit f2404319af
2 changed files with 1 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ class InventoryClassifiedHostsAPI(APIView):
asset_ids = request.data.get('assets', [])
node_ids = request.data.get('nodes', [])
runas_policy = request.data.get('runas_policy', 'privileged_first')
account_prefer = request.data.get('account_prefer', 'root,Administrator')
account_prefer = request.data.get('runas', 'root,Administrator')
module = request.data.get('module', 'shell')
# 合并节点和资产
assets = list(Asset.objects.filter(id__in=asset_ids).all())