No trace description now redirects to /new
authorJ Guthrie <jamie.guthrie@gmail.com>
Wed, 25 Jul 2018 00:49:51 +0000 (01:49 +0100)
committerJ Guthrie <jamie.guthrie@gmail.com>
Wed, 25 Jul 2018 00:49:51 +0000 (01:49 +0100)
app/controllers/traces_controller.rb

index 8994d8a..a50f008 100644 (file)
@@ -117,6 +117,7 @@ class TracesController < ApplicationController
         do_create(params[:trace][:gpx_file], params[:trace][:tagstring],
                   params[:trace][:description], params[:trace][:visibility])
       rescue StandardError => ex
+        render :action => "new" if !@trace.valid?
         logger.debug ex
       end