Skip to content

Commit

Permalink
Always save record as planningalerts now does versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed May 7, 2019
1 parent a7f2fd7 commit 64506be
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ def get_value_from_td_label(label, label_tds)

# Skip saving when there is no council_reference or no address
if record[:council_reference] && record[:address]
if (ScraperWiki.select("* from data where `council_reference`='#{record[:council_reference]}'").empty? rescue true)
ScraperWiki.save_sqlite([:council_reference], record)
else
puts "Skipping already saved record " + record[:council_reference]
end
ScraperWiki.save_sqlite([:council_reference], record)
else
puts "Skipping application due to missing council_reference or address at #{item.link}"
end
Expand Down

0 comments on commit 64506be

Please sign in to comment.