[BUG] Display error message if doer is unable to fork

- Backport of #2649
- Resolves #2504

(cherry picked from commit 773048afa1)
This commit is contained in:
Shiny Nematoda 2024-03-13 14:11:49 +00:00 committed by Gusted
parent bd71bdda26
commit 730cc56080
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -176,7 +176,7 @@ func getForkRepository(ctx *context.Context) *repo_model.Repository {
ctx.Data["ContextUser"] = orgs[0]
} else {
ctx.Data["CanForkRepo"] = false
ctx.Flash.Error(ctx.Tr("repo.fork_no_valid_owners"), true)
ctx.RenderWithErr(ctx.Tr("repo.fork_no_valid_owners"), tplFork, nil)
return nil
}