Don't raise APIAlreadyDeletedError when deleting with if-unused
authorBryan Housel <bryan@7thposition.com>
Tue, 16 Dec 2014 04:39:46 +0000 (23:39 -0500)
committerBryan Housel <bryan@7thposition.com>
Tue, 16 Dec 2014 04:39:46 +0000 (23:39 -0500)
related: openstreetmap/iD#2475

lib/diff_reader.rb

index de2da3c6bfd3c55c705918c8e79e2e3b27a3226b..ca38d350148552ba5e8c85e1b2085ed9e20ec88a 100644 (file)
@@ -241,7 +241,7 @@ class DiffReader
           if action_attributes["if-unused"]
             begin
               old.delete_with_history!(new, @changeset.user)
-            rescue OSM::APIPreconditionFailedError => ex
+            rescue OSM::APIAlreadyDeletedError, OSM::APIPreconditionFailedError => ex
               xml_result["new_id"] = old.id.to_s
               xml_result["new_version"] = old.version.to_s
             end