X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/21d2fa4f36bb45a935cdba9205ed315243f5862d..26855add3861ad496efdcae8598ffdf7d1116074:/app/controllers/notes_controller.rb diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 1b28cae6e..3eb1ac3f9 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -59,8 +59,8 @@ class NotesController < ApplicationController raise OSM::APIBadUserInput.new("No text was given") if params[:text].blank? # Extract the arguments - lon = params[:lon].to_f - lat = params[:lat].to_f + lon = OSM.parse_float(params[:lon], OSM::APIBadUserInput, "lon was not a number") + lat = OSM.parse_float(params[:lat], OSM::APIBadUserInput, "lat was not a number") comment = params[:text] # Include in a transaction to ensure that there is always a note_comment for every note