From ae6b39459fb511ffdef8bd1e29b2f2c53d2350fc Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 10 Jun 2020 18:22:47 +0000 Subject: [PATCH] Updated API resources for MeetingRegistration. - Legacy-Id: 17961 --- ietf/stats/resources.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ietf/stats/resources.py b/ietf/stats/resources.py index f7bae4a25..59722c505 100644 --- a/ietf/stats/resources.py +++ b/ietf/stats/resources.py @@ -57,7 +57,11 @@ class AffiliationAliasResource(ModelResource): } api.stats.register(AffiliationAliasResource()) +from ietf.meeting.resources import MeetingResource +from ietf.person.resources import PersonResource class MeetingRegistrationResource(ModelResource): + meeting = ToOneField(MeetingResource, 'meeting') + person = ToOneField(PersonResource, 'person', null=True) class Meta: queryset = MeetingRegistration.objects.all() serializer = api.Serializer() @@ -66,13 +70,15 @@ class MeetingRegistrationResource(ModelResource): ordering = ['id', ] filtering = { "id": ALL, - "meeting": ALL_WITH_RELATIONS, "first_name": ALL, "last_name": ALL, "affiliation": ALL, "country_code": ALL, "email": ALL, - "person": ALL_WITH_RELATIONS + "reg_type": ALL, + "ticket_type": ALL, + "attended": ALL, + "meeting": ALL_WITH_RELATIONS, + "person": ALL_WITH_RELATIONS, } api.stats.register(MeetingRegistrationResource()) -