Skip to content

Commit

Permalink
Removed NY scraper reliance on term_for_session function that require…
Browse files Browse the repository at this point in the history
…s mongodb
  • Loading branch information
showerst committed Nov 29, 2016
1 parent f59846d commit e823959
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openstates/ny/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e823959

Please sign in to comment.