X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b7f306a437f1b0d6960cdafb348a5c15366ec53e..d7badc8402876ca666236955c0012efae002e3e8:/app/models/relation.rb diff --git a/app/models/relation.rb b/app/models/relation.rb index 24b139f0d..2619a545a 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -307,16 +307,13 @@ class Relation < ActiveRecord::Base # and check that it is OK to use. unless element and element.visible? and element.preconditions_ok? - raise OSM::APIPreconditionFailedError.new("Relation with id #{self.id} cannot be saved due to #{m[0]} with id #{element.id}") - return false + raise OSM::APIPreconditionFailedError.new("Relation with id #{self.id} cannot be saved due to #{m[0]} with id #{m[1]}") end hash[m[1]] = true end end return true - rescue - return false end # Temporary method to match interface to nodes