]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Fix indentation.
[rails.git] / app / models / way.rb
index f9d36be93811cf32c071c5d1af518333ab54fb2c..8788bd671b1e2ffdd9b1c9bd82c8f371edabc45a 100644 (file)
@@ -61,6 +61,8 @@ class Way < ActiveRecord::Base
     way.visible = true
 
     pt.find('tag').each do |tag|
+      raise OSM::APIBadXMLError.new("way", pt, "tag is missing key") if tag['k'].nil?
+      raise OSM::APIBadXMLError.new("way", pt, "tag is missing value") if tag['v'].nil?
       way.add_tag_keyval(tag['k'], tag['v'])
     end