X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d3700e6201b4b78a70bbb2941572edc985b63c2c..942e62117ff7f12d40618a94ea3f4e86f8cb25af:/app/controllers/traces_controller.rb?ds=inline diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 8994d8a2e..efc5a9d3d 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -117,7 +117,12 @@ class TracesController < ApplicationController do_create(params[:trace][:gpx_file], params[:trace][:tagstring], params[:trace][:description], params[:trace][:visibility]) rescue StandardError => ex - logger.debug ex + if @trace.valid? + flash[:error] = t("traces.create.upload_failed") + logger.debug ex + end + render :action => "new" + return end if @trace.id