membershipworks: Skip canceled events in wordpress post generator
All checks were successful
Ruff / ruff (push) Successful in 32s
Test / test (push) Successful in 3m56s

This commit is contained in:
Adam Goldsmith 2024-07-18 22:28:00 -04:00
parent adc882444c
commit 33559463fb

View File

@ -107,6 +107,9 @@ def upcoming_events_wordpress(request):
and datetime.fromtimestamp(event_details["erd"]) < now and datetime.fromtimestamp(event_details["erd"]) < now
): ):
ongoing_events.append(event_details) ongoing_events.append(event_details)
# canceled events
elif event_details["cap"] == 0:
continue
# class is full # class is full
elif event_details["cnt"] >= event_details["cap"]: elif event_details["cnt"] >= event_details["cap"]:
full_events.append(event_details) full_events.append(event_details)