From 3d28e255c0b4f3dc90bead6b516f8a81eaa70088 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 12 Mar 2025 15:59:18 +0800 Subject: [PATCH] fix: Account risk page change secret failed --- apps/accounts/risk_handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/accounts/risk_handlers.py b/apps/accounts/risk_handlers.py index 9429fbf18..7184ef26d 100644 --- a/apps/accounts/risk_handlers.py +++ b/apps/accounts/risk_handlers.py @@ -130,9 +130,10 @@ class RiskHandler: def handle_change_password(self): asset = self.asset execution = AutomationExecution() + account = self.asset.accounts.get(username=self.username) execution.snapshot = { "assets": [str(asset.id)], - "accounts": [self.username], + "accounts": [str(account.id)], "type": AutomationTypes.change_secret, "secret_type": "password", "secret_strategy": "random",