]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/relation.rb
New Korean .yml file.
[rails.git] / app / models / relation.rb
index 28fa326ba9142374509be04d06dfd4bc93d92354..76cd86729cdc8ed3d3ce16600b799eb9b5813bdc 100644 (file)
@@ -60,6 +60,8 @@ class Relation < ActiveRecord::Base
     relation.visible = true
 
     pt.find('tag').each do |tag|
+      raise OSM::APIBadXMLError.new("relation", pt, "tag is missing key") if tag['k'].nil?
+      raise OSM::APIBadXMLError.new("relation", pt, "tag is missing value") if tag['v'].nil?
       relation.add_tag_keyval(tag['k'], tag['v'])
     end