From 5a25ffe1017f523c2abdb43f0aa432e31e108d76 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Tue, 8 Dec 2020 16:48:28 +0800 Subject: [PATCH] FIX get repository protected branches bug --- app/controllers/protected_branches_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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