From b296514356be75b7ba1d4f49d3696ce80976831b Mon Sep 17 00:00:00 2001 From: Joerg Date: Sat, 24 Jan 2026 18:33:54 +0100 Subject: [PATCH] fix: use entityId for QSO stats entity counting to match DXCC award Changed QSO page statistics to count entities using entity_id (numeric DXCC code) instead of entity (text field) for consistency with DXCC award progress calculations. Co-Authored-By: Claude --- src/backend/services/lotw.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/services/lotw.service.js b/src/backend/services/lotw.service.js index 56a5f5e..3da07b1 100644 --- a/src/backend/services/lotw.service.js +++ b/src/backend/services/lotw.service.js @@ -552,7 +552,7 @@ export async function getQSOStats(userId) { }).from(qsos).where(eq(qsos.userId, userId)), db.select({ - uniqueEntities: sql`CAST(COUNT(DISTINCT entity) AS INTEGER)`, + uniqueEntities: sql`CAST(COUNT(DISTINCT entity_id) AS INTEGER)`, uniqueBands: sql`CAST(COUNT(DISTINCT band) AS INTEGER)`, uniqueModes: sql`CAST(COUNT(DISTINCT mode) AS INTEGER)` }).from(qsos).where(eq(qsos.userId, userId))