fix aggregation logic
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-23 09:38:08 +11:00
parent 8a3481b966
commit 3e2d95d3b9
16 changed files with 384 additions and 168 deletions

View File

@@ -118,10 +118,14 @@ func (h *Handler) renderSnapshotList(w http.ResponseWriter, r *http.Request, sna
case "monthly":
group = record.SnapshotTime.Format("2006")
}
count := record.SnapshotCount
if count < 0 {
count = 0
}
entries = append(entries, views.SnapshotEntry{
Label: label,
Link: "/reports/" + url.PathEscape(record.TableName) + ".xlsx",
Count: record.SnapshotCount,
Count: count,
Group: group,
})
}