fix: 历史账号数量计算错误 (#13023)

Co-authored-by: feng <1304903146@qq.com>
pull/13024/head
fit2bot 2024-04-15 17:17:11 +08:00 committed by GitHub
parent 7660e3228e
commit 4423f842e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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: