1
0
mirror of https://github.com/jumpserver/jumpserver.git synced 2025-05-04 22:27:06 +00:00

perf: automation .account -> .all_accounts

This commit is contained in:
feng 2025-04-14 14:16:28 +08:00 committed by ZhaoJiSen
parent 3b2ac101c8
commit 2ca0e9a5a2
3 changed files with 3 additions and 3 deletions
apps
accounts/automations
base
verify_account
ops/ansible

View File

@ -69,7 +69,7 @@ class BaseChangeSecretPushManager(AccountBasePlaybookManager):
return
asset = privilege_account.asset
accounts = asset.accounts.all()
accounts = asset.all_accounts.all()
accounts = accounts.filter(id__in=self.account_ids, secret_reset=True)
if self.secret_type:

View File

@ -42,7 +42,7 @@ class VerifyAccountManager(AccountBasePlaybookManager):
if host.get('error'):
return host
accounts = asset.accounts.all()
accounts = asset.all_accounts.all()
accounts = self.get_accounts(account, accounts)
inventory_hosts = []

View File

@ -237,7 +237,7 @@ class JMSInventory:
return accounts_sorted
def get_asset_sorted_accounts(self, asset):
accounts = list(asset.accounts.filter(is_active=True))
accounts = list(asset.all_accounts.filter(is_active=True))
accounts_sorted = self.sorted_accounts(accounts)
return accounts_sorted