From dd784396ce6fc6a000949c4193f105c2f0540f67 Mon Sep 17 00:00:00 2001 From: Wendell Sun Date: Sat, 24 Feb 2018 06:07:25 +0800 Subject: [PATCH] Fix query protected branch bug (#3563) (#3571) Signed-off-by: Wendell Sun --- models/branches.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/branches.go b/models/branches.go index bf5d4fdb4..0a3d19858 100644 --- a/models/branches.go +++ b/models/branches.go @@ -6,7 +6,6 @@ package models import ( "fmt" - "strings" "time" "code.gitea.io/gitea/modules/base" @@ -70,7 +69,7 @@ func GetProtectedBranchByRepoID(RepoID int64) ([]*ProtectedBranch, error) { // GetProtectedBranchBy getting protected branch by ID/Name func GetProtectedBranchBy(repoID int64, BranchName string) (*ProtectedBranch, error) { - rel := &ProtectedBranch{RepoID: repoID, BranchName: strings.ToLower(BranchName)} + rel := &ProtectedBranch{RepoID: repoID, BranchName: BranchName} has, err := x.Get(rel) if err != nil { return nil, err