]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces_controller.rb
Refactored and added new test
[rails.git] / app / controllers / traces_controller.rb
index 8994d8a2e58df90e17535edf5ae63a6cf08b258e..efc5a9d3d1e036ea1087b0580f05410ab357b349 100644 (file)
@@ -117,7 +117,12 @@ class TracesController < ApplicationController
         do_create(params[:trace][:gpx_file], params[:trace][:tagstring],
                   params[:trace][:description], params[:trace][:visibility])
       rescue StandardError => ex
-        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