mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-02 00:39:16 +00:00
Backport #22512 Co-authored-by: Brecht Van Lommel <brecht@blender.org>
This commit is contained in:
parent
e6e2c2f4a4
commit
63e5db5d7a
|
@ -109,6 +109,9 @@ func IsUserAllowedToUpdate(ctx context.Context, pull *issues_model.PullRequest,
|
||||||
if pr.ProtectedBranch == nil {
|
if pr.ProtectedBranch == nil {
|
||||||
prUnit, err := pr.BaseRepo.GetUnit(unit.TypePullRequests)
|
prUnit, err := pr.BaseRepo.GetUnit(unit.TypePullRequests)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if repo_model.IsErrUnitTypeNotExist(err) {
|
||||||
|
return false, false, nil
|
||||||
|
}
|
||||||
log.Error("pr.BaseRepo.GetUnit(unit.TypePullRequests): %v", err)
|
log.Error("pr.BaseRepo.GetUnit(unit.TypePullRequests): %v", err)
|
||||||
return false, false, err
|
return false, false, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue