Fix going count to only sum RSVPs, not claims + RSVPs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 23:18:51 -04:00
parent e7022124be
commit 44c20d54ff
+1 -2
View File
@@ -174,11 +174,9 @@ func (s *Server) loadEventPage(r *http.Request, slug string, isAdmin bool) (*Eve
} }
var slotViews []SlotView var slotViews []SlotView
var totalGoing int64
for _, slot := range slots { for _, slot := range slots {
sc := claimsBySlot[slot.ID] sc := claimsBySlot[slot.ID]
count := int64(len(sc)) count := int64(len(sc))
totalGoing += count
pct := int64(0) pct := int64(0)
if slot.MaxClaims > 0 { if slot.MaxClaims > 0 {
pct = (count * 100) / slot.MaxClaims pct = (count * 100) / slot.MaxClaims
@@ -199,6 +197,7 @@ func (s *Server) loadEventPage(r *http.Request, slug string, isAdmin bool) (*Eve
if err != nil { if err != nil {
return nil, err return nil, err
} }
var totalGoing int64
for _, r := range rsvps { for _, r := range rsvps {
totalGoing += 1 + r.PlusOne totalGoing += 1 + r.PlusOne
} }