diff --git a/membershipworks/tasks/scrape.py b/membershipworks/tasks/scrape.py index 119c4b0..7c2b0cd 100644 --- a/membershipworks/tasks/scrape.py +++ b/membershipworks/tasks/scrape.py @@ -4,7 +4,6 @@ from datetime import datetime, timedelta from django.conf import settings from django.db import transaction -from django.db.models import QuerySet from cmsmanage.django_q2_helper import q_task_group from membershipworks.membershipworks_api import FieldType, MembershipWorks @@ -125,13 +124,13 @@ def scrape_membershipworks(*args, **options): scrape_transactions(membershipworks) -def scrape_event_details(queryset: QuerySet[EventExt]): +def scrape_event_details(events: Iterable[EventExt]): membershipworks = MembershipWorks() membershipworks.login( settings.MEMBERSHIPWORKS_USERNAME, settings.MEMBERSHIPWORKS_PASSWORD ) - for event in queryset: + for event in events: event.details = membershipworks.get_event_by_eid(event.eid) event.registrations = membershipworks.get_event_registrations(event.eid) event.save() diff --git a/membershipworks/templates/membershipworks/event_registrations.dj.html b/membershipworks/templates/membershipworks/event_registrations.dj.html index 4c0af38..8d3bd91 100644 --- a/membershipworks/templates/membershipworks/event_registrations.dj.html +++ b/membershipworks/templates/membershipworks/event_registrations.dj.html @@ -22,6 +22,18 @@ {% bootstrap_button extra_classes="btn-sm" href=email_link target="_blank" content="Email all attendees" %}