mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-18 10:16:59 +00:00
fix
This commit is contained in:
parent
349c594489
commit
2e141d820a
@ -856,12 +856,15 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
||||
Config: config,
|
||||
})
|
||||
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki)
|
||||
} else if !*opts.HasWiki && !unit_model.TypeExternalWiki.UnitGlobalDisabled() {
|
||||
} else if !*opts.HasWiki {
|
||||
if !unit_model.TypeExternalWiki.UnitGlobalDisabled() {
|
||||
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki)
|
||||
} else if !*opts.HasWiki && !unit_model.TypeWiki.UnitGlobalDisabled() {
|
||||
}
|
||||
if !unit_model.TypeWiki.UnitGlobalDisabled() {
|
||||
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeWiki)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if opts.HasPullRequests != nil && !unit_model.TypePullRequests.UnitGlobalDisabled() {
|
||||
if *opts.HasPullRequests {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user