浏览代码

Fix query protected branch bug (#3563)

Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
tags/v1.5.0-dev
Wendell Sun 6 年前
父节点
当前提交
19bf4ddf80
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      models/branches.go

+ 1
- 2
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

正在加载...
取消
保存