Fix a bug when setting repository private

This commit is contained in:
Lunny Xiao 2025-06-21 12:58:10 -07:00
parent ddd1e6ca83
commit bbc3145f3e
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ func handleSettingsPostUpdate(ctx *context.Context) {
// Visibility of forked repository is forced sync with base repository.
if repo.IsFork {
form.Private = repo.BaseRepo.IsPrivate || repo.BaseRepo.Owner.Visibility == structs.VisibleTypePrivate
repo.IsPrivate = repo.BaseRepo.IsPrivate || repo.BaseRepo.Owner.Visibility == structs.VisibleTypePrivate
}
if err := repo_service.UpdateRepository(ctx, repo, false); err != nil {