From e823959daedc936c20b5243226982ed4cc0d201c Mon Sep 17 00:00:00 2001 From: Tim Showers Date: Tue, 29 Nov 2016 11:08:04 -0500 Subject: [PATCH] Removed NY scraper reliance on term_for_session function that requires mongodb --- openstates/ny/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openstates/ny/models.py b/openstates/ny/models.py index a66b973b38..8fd1c0dcba 100644 --- a/openstates/ny/models.py +++ b/openstates/ny/models.py @@ -32,7 +32,11 @@ def __init__(self, scraper, session, bill, details): self.bill_id = bill_id # This works on the assumption that the metadata term ID is # only the start year. - self.term_start_year = term_for_session('ny', session) + for term in reversed(self.metadata['terms']): + if session in term['sessions']: + self.term_start_year = term['start_year'] + break + self.letter, self.number, self.version = bill_id_parts self.shared_url = 'http://assembly.state.ny.us/leg/?default_fld='\ '&bn={}&term={}'.format(self.bill_id, self.term_start_year)