Refactored and added new test

This commit is contained in:
J Guthrie 2018-07-26 16:27:28 +01:00
parent a04b19a9ae
commit 07480996d7
2 changed files with 21 additions and 2 deletions

View file

@ -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