X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6fa8647855b81a2f518c4995969113038187759c..5b51a8d6247bd5ad76179e648aaccf8246c78f9d:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index 958944200..45789dabe 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -235,6 +235,8 @@ class Way < ActiveRecord::Base # delete a way and it's nodes that aren't part of other ways, with history def delete_with_relations_and_nodes_and_history(user) + node_ids_to_delete = node_ids - node_ids_not_to_delete + # delete the nodes not used by other ways self.unshared_node_ids.each do |node_id| n = Node.find(node_id)