From addd2a7a86d03961c07b69d4f6cd91631a6779eb Mon Sep 17 00:00:00 2001 From: Rajat Aggarwal Date: Thu, 6 Jul 2023 14:54:35 -0700 Subject: [PATCH] Test Branch --- cdp_scrapers/legistar_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cdp_scrapers/legistar_utils.py b/cdp_scrapers/legistar_utils.py index 8fe6e925..375588d2 100644 --- a/cdp_scrapers/legistar_utils.py +++ b/cdp_scrapers/legistar_utils.py @@ -366,15 +366,20 @@ def get_legistar_events_for_timespan( ) ).json() + + visited = [] # legistar MatterSponsor just has a reference to a Person # so further obtain the actual Person information for sponsor in sponsors: + if sponsor["MatterSponsorNameId"] in visited: + continue + else: + visited.add(sponsor["MatterSponsorNameId"]) sponsor[LEGISTAR_SPONSOR_PERSON] = get_legistar_person( client=client, person_id=sponsor["MatterSponsorNameId"], use_cache=True, ) - event_item[LEGISTAR_MATTER_SPONSORS] = sponsors log.debug(f"Collected {len(response)} Legistar events")