From e03d9830208d6b5640b469cae6e743752a7428e3 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 12 Mar 2025 14:52:05 +0800 Subject: [PATCH] fix: Gather account new-found risk failed --- apps/accounts/automations/gather_account/manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/accounts/automations/gather_account/manager.py b/apps/accounts/automations/gather_account/manager.py index 048cd57dd..ad2a6994c 100644 --- a/apps/accounts/automations/gather_account/manager.py +++ b/apps/accounts/automations/gather_account/manager.py @@ -1,6 +1,6 @@ -import time from collections import defaultdict +import time from django.utils import timezone from accounts.const import AutomationTypes @@ -159,10 +159,10 @@ class AnalyseAccountRisk: if not self.check_risk: return - basic = {"asset": asset, "username": d["username"], 'gathered_account': ga.id} if ga: self._analyse_item_changed(ga, d) - elif not sys_found: + if not sys_found: + basic = {"asset": asset, "username": d["username"], 'gathered_account': ga} self._create_risk( dict( **basic,