X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a04b19a9aede097d2d7ea0d5cb10cef69312bbd3..942e62117ff7f12d40618a94ea3f4e86f8cb25af:/app/controllers/traces_controller.rb diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 9dd82f8bb..efc5a9d3d 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -117,8 +117,12 @@ class TracesController < ApplicationController do_create(params[:trace][:gpx_file], params[:trace][:tagstring], params[:trace][:description], params[:trace][:visibility]) rescue StandardError => ex - render :action => "new" and return unless @trace.valid? - 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