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 de2da3c..ca38d35 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