]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Mark some extra methods as needing write access to the database
[rails.git] / app / models / node.rb
index 96d927b2c9144f8e915111990d16ad8834e15da4..53787245916d5c60bca1e16060e17cd0183791e2 100644 (file)
@@ -106,6 +106,10 @@ class Node < ActiveRecord::Base
     # and set manually before the actual delete
     node.visible = true
 
+    # Start with no tags
+    node.tags = Hash.new
+
+    # Add in any tags from the XML
     pt.find('tag').each do |tag|
       raise OSM::APIBadXMLError.new("node", pt, "tag is missing key") if tag['k'].nil?
       raise OSM::APIBadXMLError.new("node", pt, "tag is missing value") if tag['v'].nil?