From a727cabd473170ded28b638895d95bcaeb035934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heath=20Dutton=F0=9F=95=B4=EF=B8=8F?= Date: Wed, 31 Dec 2025 12:37:32 -0500 Subject: [PATCH] Fix incorrect user task total on contributions page Exclude bad_imagery count from total calculation to match frontend display which only shows mapped + validated tasks. --- backend/services/stats_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/stats_service.py b/backend/services/stats_service.py index 5c87484899..ebae7dccc1 100644 --- a/backend/services/stats_service.py +++ b/backend/services/stats_service.py @@ -382,7 +382,7 @@ async def get_user_contributions( COALESCE(m.count, 0) AS mapped, COALESCE(v.count, 0) AS validated, COALESCE(b.count, 0) AS bad_imagery, - COALESCE(m.count, 0) + COALESCE(v.count, 0) + COALESCE(b.count, 0) AS total, + COALESCE(m.count, 0) + COALESCE(v.count, 0) AS total, COALESCE(m.task_ids, '{}') AS mapped_tasks, COALESCE(v.task_ids, '{}') AS validated_tasks, COALESCE(b.task_ids, '{}') AS bad_imagery_tasks