mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
Fix panic for fixBrokenRepoUnits16961
(#30068)
![image](https://github.com/go-gitea/gitea/assets/18380374/508b3ceb-f53d-4d3b-a781-97c1542af1cb) (cherry picked from commit 08aec2c20adae8e6f04cac08566a8decd818e5cd)
This commit is contained in:
parent
faffda01e3
commit
eb696438fe
1 changed files with 6 additions and 0 deletions
|
@ -216,6 +216,12 @@ func fixBrokenRepoUnit16961(repoUnit *repo_model.RepoUnit, bs []byte) (fixed boo
|
|||
return false, nil
|
||||
}
|
||||
|
||||
var cfg any
|
||||
err = json.UnmarshalHandleDoubleEncode(bs, &cfg)
|
||||
if err == nil {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
switch repoUnit.Type {
|
||||
case unit.TypeCode, unit.TypeReleases, unit.TypeWiki, unit.TypeProjects:
|
||||
cfg := &repo_model.UnitConfig{}
|
||||
|
|
Loading…
Reference in a new issue