mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
#1040: dashboard no longer accessible when repo is missing
This commit is contained in:
parent
471b8a18ab
commit
588f3215c6
11 changed files with 51 additions and 15 deletions
|
@ -124,7 +124,7 @@ func TeamsRepoAction(ctx *middleware.Context) {
|
|||
var repo *models.Repository
|
||||
repo, err = models.GetRepositoryByName(ctx.Org.Organization.Id, repoName)
|
||||
if err != nil {
|
||||
if err == models.ErrRepoNotExist {
|
||||
if models.IsErrRepoNotExist(err) {
|
||||
ctx.Flash.Error(ctx.Tr("org.teams.add_nonexistent_repo"))
|
||||
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue