diff --git a/app/controllers/protected_branches_controller.rb b/app/controllers/protected_branches_controller.rb index 364433d78..123004a4d 100644 --- a/app/controllers/protected_branches_controller.rb +++ b/app/controllers/protected_branches_controller.rb @@ -6,7 +6,7 @@ class ProtectedBranchesController < ApplicationController before_action :authorizate_user_can_edit_project! def index - scope = ProtectedBranch.all + scope = @repository.protected_branches @total_count = scope.size @protected_branches = paginate(scope) end