Remove unneeded if statements for update repo API (#35140)

just try to make the update func more redable and be more KISS

---
_Sponsored by Kithara Software GmbH_
This commit is contained in:
6543
2025-08-05 03:38:35 +02:00
committed by GitHub
parent 1692652d65
commit de570b7dde
2 changed files with 13 additions and 34 deletions

View File

@ -53,9 +53,8 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption
hasWiki = true
} else if unit, err := repo.GetUnit(db.DefaultContext, unit_model.TypeExternalWiki); err == nil {
hasWiki = true
config := unit.ExternalWikiConfig()
externalWiki = &api.ExternalWiki{
ExternalWikiURL: config.ExternalWikiURL,
ExternalWikiURL: unit.ExternalWikiConfig().ExternalWikiURL,
}
}
defaultBranch := repo.DefaultBranch