X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc2a95903722644f6109244cec9a2d1e195fef0e..061d77726666beb8bccc27e0d410c4dc0ee4ef09:/lib/diff_reader.rb diff --git a/lib/diff_reader.rb b/lib/diff_reader.rb index eca6d438c..d793f63e7 100644 --- a/lib/diff_reader.rb +++ b/lib/diff_reader.rb @@ -99,9 +99,8 @@ class DiffReader # diff, so we must fix these before saving the element. new.fix_placeholders!(ids) - # set the initial version to zero and save (which increments it) - new.version = 0 - new.save_with_history! + # create element given user + new.create_with_history(@changeset.user) # save placeholder => allocated ID map ids[model.to_s.downcase.to_sym][placeholder_id] = new.id @@ -156,7 +155,7 @@ class DiffReader else # no other actions to choose from, so it must be the users fault! - raise "Unknown action #{action_name}, choices are create, modify, delete." + raise OSM::APIChangesetActionInvalid.new(action_name) end end