]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Delete tokens for an application when the application is deleted
[rails.git] / app / models / node.rb
index 0f176067d75e8aeb218c51ae8eaf3258f36a0e81..0953241d91f2767030f452f5caafac73c193a4ff 100644 (file)
@@ -3,8 +3,9 @@ class Node < ActiveRecord::Base
 
   include GeoRecord
   include ConsistencyValidations
+  include NotRedactable
 
-  set_table_name 'current_nodes'
+  self.table_name = "current_nodes"
 
   belongs_to :changeset
 
@@ -106,6 +107,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?