X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d6e047d7d45ea76d56dccb53cc1fe1f5b54734d5..db66d47e42bc267670ef00b3b2611b4b53cb40e9:/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)