X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/77bece20ff81805e97e73d87e8dadabf1db13267..086f31f291f1646fda292ca838784cccc61a75ad:/app/controllers/api/changesets_controller.rb diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index a5a37b485..34627a118 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -21,7 +21,7 @@ module Api def create assert_method :put - cs = Changeset.from_xml(request.raw_post, true) + cs = Changeset.from_xml(request.raw_post, :create => true) # Assume that Changeset.from_xml has thrown an exception if there is an error parsing the xml cs.user = current_user @@ -308,7 +308,7 @@ module Api # low, second is high - same as with bounding boxes. # check that we actually have 2 elements in the array - times = time.split(/,/) + times = time.split(",") raise OSM::APIBadUserInput, "bad time range" if times.size != 2 from, to = times.collect { |t| Time.parse(t) } @@ -319,9 +319,7 @@ module Api end # stupid Time seems to throw both of these for bad parsing, so # we have to catch both and ensure the correct code path is taken. - rescue ArgumentError => e - raise OSM::APIBadUserInput, e.message.to_s - rescue RuntimeError => e + rescue ArgumentError, RuntimeError => e raise OSM::APIBadUserInput, e.message.to_s end