X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a2498928e470b358f69902d9fdc72a1a80aa5bf8..c02c516047f20cdaa8120968e514420f6c2c6034:/app/models/old_node.rb?ds=sidebyside diff --git a/app/models/old_node.rb b/app/models/old_node.rb index e7d803044..91b5a1a8e 100644 --- a/app/models/old_node.rb +++ b/app/models/old_node.rb @@ -1,5 +1,6 @@ class OldNode < ActiveRecord::Base include GeoRecord + include ConsistencyValidations set_table_name 'nodes' @@ -60,7 +61,7 @@ class OldNode < ActiveRecord::Base clear_aggregation_cache clear_association_cache #ok from here - @attributes.update(OldNode.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp]).instance_variable_get('@attributes')) + @attributes.update(OldNode.find(:first, :conditions => ['id = ? AND timestamp = ? AND version = ?', self.id, self.timestamp, self.version]).instance_variable_get('@attributes')) self.tags.each do |k,v| tag = OldNodeTag.new