瀏覽代碼

Sometimes date fields have values that aren't dates

Like "Not available" in Greenwich.
tags/v0.4.5
Adrian Short 6 年之前
父節點
當前提交
7441f13d6b
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      lib/uk_planning_scraper/idox.rb

+ 4
- 4
lib/uk_planning_scraper/idox.rb 查看文件

@@ -129,11 +129,11 @@ module UKPlanningScraper
when 'Planning Portal Reference'
app[:alternative_reference] = value
when 'Application Received'
app[:date_received] = Date.parse(value) if value != ''
app[:date_received] = Date.parse(value) if value.match(/\d/)
when 'Application Registered'
app[:date_received] = Date.parse(value) if value != ''
app[:date_received] = Date.parse(value) if value.match(/\d/)
when 'Application Validated'
app[:date_validated] = Date.parse(value) if value != ''
app[:date_validated] = Date.parse(value) if value.match(/\d/)
when 'Address'
app[:address] = value
when 'Proposal'
@@ -143,7 +143,7 @@ module UKPlanningScraper
when 'Decision'
app[:decision] = value
when 'Decision Issued Date'
app[:date_decision] = Date.parse(value) if value != ''
app[:date_decision] = Date.parse(value) if value.match(/\d/)
when 'Appeal Status'
app[:appeal_status] = value
when 'Appeal Decision'


Loading…
取消
儲存