X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bbd769304cf29bbd9574fd3c7167feb7d5d0aa17..6c31dbaaec8dcd86682acf404be5f80fc8c0a352:/app/controllers/way_controller.rb diff --git a/app/controllers/way_controller.rb b/app/controllers/way_controller.rb index c3640609a..a7f74e50c 100644 --- a/app/controllers/way_controller.rb +++ b/app/controllers/way_controller.rb @@ -15,6 +15,7 @@ class WayController < ApplicationController if !way.preconditions_ok? render :text => "", :status => :precondition_failed else + way.version = 0 way.user_id = @user.id way.save_with_history! @@ -77,7 +78,6 @@ class WayController < ApplicationController # if we get here, all is fine, otherwise something will catch below. render :nothing => true - return rescue OSM::APIAlreadyDeletedError render :text => "", :status => :gone rescue OSM::APIPreconditionFailedError @@ -132,7 +132,7 @@ class WayController < ApplicationController end def ways_for_node - wayids = WayNode.find(:all, :conditions => ['node_id = ?', params[:id]]).collect { |ws| ws.id }.uniq + wayids = WayNode.find(:all, :conditions => ['node_id = ?', params[:id]]).collect { |ws| ws.id[0] }.uniq doc = OSM::API.new.get_xml_doc