Skip to content

Commit

Permalink
More changes to remove reliance on mongodb in ny
Browse files Browse the repository at this point in the history
  • Loading branch information
showerst committed Nov 29, 2016
1 parent e823959 commit 7088440
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions openstates/ny/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def scrape(self, session, chambers):
for term in reversed(self.metadata['terms']):
if session in term['sessions']:
self.term_start_year = term['start_year']
break

for bill in self._generate_bills(session):
bill_object = self._scrape_bill(session, bill)
Expand Down
4 changes: 2 additions & 2 deletions openstates/ny/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +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.
for term in reversed(self.metadata['terms']):
for term in reversed(scraper.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 7088440

Please sign in to comment.