]> git.openstreetmap.org Git - rails.git/commitdiff
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 8994d8a2e58df90e17535edf5ae63a6cf08b258e..a50f00829815840e332ff5f5cb79923519c0ab7b 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