X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bf29550db840c97cafffbe1e836750bef6c7942d..acc5ffbe1ca930676ec0ec71592e2b37d9029ce6:/lib/diff_reader.rb diff --git a/lib/diff_reader.rb b/lib/diff_reader.rb index d793f63e7..6a053e4ad 100644 --- a/lib/diff_reader.rb +++ b/lib/diff_reader.rb @@ -79,6 +79,7 @@ class DiffReader ids = { :node => node_ids, :way => way_ids, :relation => rel_ids} result = OSM::API.new.get_xml_doc + result.root.name = "diffResult" # loop at the top level, within the element (although we # don't actually check this...) @@ -129,8 +130,10 @@ class DiffReader xml_result = XML::Node.new model.to_s.downcase xml_result["old_id"] = old.id.to_s - xml_result["new_id"] = new.id.to_s - xml_result["new_version"] = new.version.to_s + xml_result["new_id"] = new.id.to_s + # version is updated in "old" through the update, so we must not + # return new.version here but old.version! + xml_result["new_version"] = old.version.to_s result.root << xml_result end