membershipworks: Delete Events that don't exist in membershipworks during scrape

This commit is contained in:
Adam Goldsmith 2024-08-10 09:58:17 -04:00
parent cd054bd716
commit cc31f97bc4

View File

@ -178,3 +178,6 @@ def scrape_events():
event_ext.details = membershipworks.get_event_by_eid(event.eid)
event_ext.registrations = membershipworks.get_event_registrations(event.eid)
event_ext.save()
# delete all events that did not occur in the event list
EventExt.objects.exclude(pk__in=events).delete()