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