mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Decrement Fork Num when converting from Fork (#17035)
When converting repositories from forks to normal the root NumFork needs to be decremented too. Fix #17026 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -555,10 +555,8 @@ func SettingsPost(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
repo.IsFork = false
|
||||
repo.ForkID = 0
|
||||
if err := models.UpdateRepository(repo, false); err != nil {
|
||||
log.Error("Unable to update repository %-v whilst converting from fork", repo)
|
||||
if err := repository.ConvertForkToNormalRepository(repo); err != nil {
|
||||
log.Error("Unable to convert repository %-v from fork. Error: %v", repo, err)
|
||||
ctx.ServerError("Convert Fork", err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user