2985: let error propagate during save
authorradhika <radhika@curoverse.com>
Wed, 30 Jul 2014 20:02:25 +0000 (16:02 -0400)
committerradhika <radhika@curoverse.com>
Wed, 30 Jul 2014 20:02:25 +0000 (16:02 -0400)
apps/workbench/app/controllers/actions_controller.rb
apps/workbench/app/controllers/projects_controller.rb

index e3cdd5589e0312a6040a7af6597b89485ab91a64..9f2cfb09f3da31ecb6953b5e5a3e915b212d757f 100644 (file)
@@ -70,7 +70,12 @@ class ActionsController < ApplicationController
           dst.owner_uuid = @object.uuid
           dst.tail_uuid = @object.uuid if dst.class == Link
         end
-        dst.save!
+        begin
+          dst.save!
+        rescue
+          dst.name += " (#{Time.now.localtime})" if dst.respond_to? :name=
+          dst.save!
+        end
       end
     end
     redirect_to @object
index d243ef426800b44fe5cd9b351be67bc33b8222d4..2b605d3f834feb4e5deb425598a3b16522f2094f 100644 (file)
@@ -71,12 +71,7 @@ class ProjectsController < ApplicationController
           dst.owner_uuid = target_uuid
           dst.tail_uuid = target_uuid if dst.class == Link
         end
-        begin
-          dst.save!
-        rescue
-          dst.name += " (#{Time.now.localtime})" if dst.respond_to? :name=
-          dst.save!
-        end
+        dst.save!
       end
     end
     session[:selected_move_items] = nil