From ec0608396951cc3f4fe7004683b73c93ea16b959 Mon Sep 17 00:00:00 2001 From: wilsoc5 Date: Fri, 3 Apr 2015 10:57:50 -0500 Subject: [PATCH] Fix protected branch reordering 500 with Argument Error --- app/controllers/repository_protected_branches_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repository_protected_branches_controller.rb b/app/controllers/repository_protected_branches_controller.rb index 9e19fd089..c7acbcfed 100644 --- a/app/controllers/repository_protected_branches_controller.rb +++ b/app/controllers/repository_protected_branches_controller.rb @@ -52,7 +52,7 @@ def clone def sort params[:repository_protected_branche].each_with_index do |id, index| - @repository.protected_branches.update_all({position: index + 1}, {id: id}) + @repository.protected_branches.where(:id => id).update_all({:position => index + 1}) end # Update Gitolite repository call_use_case