Skip to content
This repository has been archived by the owner on Dec 17, 2017. It is now read-only.

Commit

Permalink
IDN datasets may have no data. Check points exist before adding to list
Browse files Browse the repository at this point in the history
  • Loading branch information
glasnt committed Jan 5, 2015
1 parent 65f2bb8 commit 1ce8993
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/store/idn.rb
Expand Up @@ -30,8 +30,10 @@ def get_metrics_list
data_files.each{|f|
d = JSON.parse(File.read(f))
site = nameparse(d.observations.header.first.name)
measures = d.observations.data.first.map{|k,v| k}.select{|m| METS.include? m}
list.push( measures.map{|m| "#{site}#{sep}#{m}"})
unless d.observations.data.empty?
measures = d.observations.data.first.map{|k,v| k}.select{|m| METS.include? m}
list.push( measures.map{|m| "#{site}#{sep}#{m}"})
end
}

set_idn_sitemap
Expand Down

0 comments on commit 1ce8993

Please sign in to comment.