X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/baf10cd39289cd7e94a819305e46f43e85a136c6..5cbd4038edb32b0304bd766e70fc680ea447b52b:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index 7d2219d75..19210b8ac 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -104,9 +104,7 @@ class Node < ActiveRecord::Base # Should probably be renamed delete_from to come in line with update def delete_with_history!(new_node, user) - unless visible - fail OSM::APIAlreadyDeletedError.new("node", new_node.id) - end + fail OSM::APIAlreadyDeletedError.new("node", new_node.id) unless visible # need to start the transaction here, so that the database can # provide repeatable reads for the used-by checks. this means it