From ac5dd3118c985817d07e5dc8ee3fcc583721caa1 Mon Sep 17 00:00:00 2001 From: Tony Bowden Date: Mon, 28 Nov 2016 10:19:26 +0000 Subject: [PATCH] Don't set an end date for the current term The way we generate term dates is to look for the earliest and latest dates of memberships in that term. But that means that we set the end date of the current term to the latest end_date of any Membership in it. Instead we should explicitly delete that date. --- scraper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scraper.rb b/scraper.rb index 0e313c9..e01b029 100644 --- a/scraper.rb +++ b/scraper.rb @@ -106,4 +106,6 @@ def scrape_person(id, icon) end_date: ds.map(&:last).compact.max, } end +# Don't set the date of the current term to the latest resignation date +term_data.last[:end_date] = nil ScraperWiki.save_sqlite([:id], term_data, 'terms')