From 19bf4ddf800dd405bddbafee7574ff4df07ed275 Mon Sep 17 00:00:00 2001 From: Wendell Sun Date: Fri, 23 Feb 2018 10:14:15 +0800 Subject: [PATCH] Fix query protected branch bug (#3563) 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 7cc0ebab4..d1921d550 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