3170: Fix stale use of tab_pane_valid_state. refs #3170
[arvados.git] / apps / workbench / app / controllers / application_controller.rb
index f01c589d1e11f35a5d49c1bc3e77223e9e44464c..c32bac46bf5764d34dc930617e840c5b3d6850fc 100644 (file)
@@ -258,7 +258,7 @@ class ApplicationController < ActionController::Base
       if @object.name and @object.name != ''
         @object.name = "Copy of #{@object.name}"
       else
-        @object.name = "Copy of unnamed #{@object.class_for_display.downcase}"
+        @object.name = ""
       end
     end
     @object.save!
@@ -356,7 +356,10 @@ class ApplicationController < ActionController::Base
       else
         @object = model_class.find(params[:uuid])
       end
-    rescue ArvadosApiClient::NotFoundException => error
+    rescue ArvadosApiClient::NotFoundException, RuntimeError => error
+      if error.is_a?(RuntimeError) and (error.message !~ /^argument to find\(/)
+        raise
+      end
       render_not_found(error)
       return false
     end