Преглед изворни кода

Fix the protected branch panic issue (#3567)

tags/v1.5.0-dev
Wendell Sun пре 6 година
родитељ
комит
d2d0aea8a1
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4
    0
      models/branches.go

+ 4
- 0
models/branches.go Прегледај датотеку

@@ -155,6 +155,10 @@ func (repo *Repository) GetProtectedBranches() ([]*ProtectedBranch, error) {

// IsProtectedBranch checks if branch is protected
func (repo *Repository) IsProtectedBranch(branchName string, doer *User) (bool, error) {
if doer == nil {
return true, nil
}

protectedBranch := &ProtectedBranch{
RepoID: repo.ID,
BranchName: branchName,

Loading…
Откажи
Сачувај