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:
parent
3b2ac101c8
commit
2ca0e9a5a2
apps
@ -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:
|
||||
|
@ -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 = []
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user