From 4423f842e0158680efa25e38fcbbed7bb56bb295 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:17:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=86=E5=8F=B2=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=20(#1302?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng <1304903146@qq.com> --- apps/accounts/tasks/remove_account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/accounts/tasks/remove_account.py b/apps/accounts/tasks/remove_account.py index 6b637ed96..44bb9a840 100644 --- a/apps/accounts/tasks/remove_account.py +++ b/apps/accounts/tasks/remove_account.py @@ -55,7 +55,7 @@ def clean_historical_accounts(): history_model = Account.history.model history_id_mapper = defaultdict(list) - ids = history_model.objects.values('id').annotate(count=Count('id', distinct=True)) \ + ids = history_model.objects.values('id').annotate(count=Count('id')) \ .filter(count__gte=limit).values_list('id', flat=True) if not ids: