aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWendell Sun2018-02-24 06:07:25 +0800
committerLauris BH2018-02-24 00:07:25 +0200
commitdd784396ce6fc6a000949c4193f105c2f0540f67 (patch)
tree2d26ffea964d3213e1af7ad05de6b008554179c9
parent4a0ce6896b4ed938626361a81aab163213df2cec (diff)
Fix query protected branch bug (#3563) (#3571)
Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
-rw-r--r--models/branches.go3
1 files changed, 1 insertions, 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