From 33559463fb0ff90ed37952d4fd71a711866354d0 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 18 Jul 2024 22:28:00 -0400 Subject: [PATCH] membershipworks: Skip canceled events in wordpress post generator --- membershipworks/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/membershipworks/views.py b/membershipworks/views.py index 73882d0..2f835d4 100644 --- a/membershipworks/views.py +++ b/membershipworks/views.py @@ -107,6 +107,9 @@ def upcoming_events_wordpress(request): and datetime.fromtimestamp(event_details["erd"]) < now ): ongoing_events.append(event_details) + # canceled events + elif event_details["cap"] == 0: + continue # class is full elif event_details["cnt"] >= event_details["cap"]: full_events.append(event_details)