]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces_controller.rb
Switched if to unless to satisfy rubycop
[rails.git] / app / controllers / traces_controller.rb
index 8994d8a2e58df90e17535edf5ae63a6cf08b258e..2e3e6b8e63c640083d4b4abdf6e2c514d6c750cc 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" unless @trace.valid?
         logger.debug ex
       end