Refactored and added new test
This commit is contained in:
parent
a04b19a9ae
commit
07480996d7
2 changed files with 21 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue