mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-20 23:28:28 +02:00
fix github migration asset ID nil panic
This commit is contained in:
parent
806f915b3c
commit
fdac8bdd17
@ -322,7 +322,10 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith
|
|||||||
httpClient := NewMigrationHTTPClient()
|
httpClient := NewMigrationHTTPClient()
|
||||||
|
|
||||||
for _, asset := range rel.Assets {
|
for _, asset := range rel.Assets {
|
||||||
assetID := *asset.ID // Don't optimize this, for closure we need a local variable
|
assetID := asset.GetID() // Don't optimize this, for closure we need a local variable TODO: no need to do so in new Golang
|
||||||
|
if assetID == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
r.Assets = append(r.Assets, &base.ReleaseAsset{
|
r.Assets = append(r.Assets, &base.ReleaseAsset{
|
||||||
ID: asset.GetID(),
|
ID: asset.GetID(),
|
||||||
Name: asset.GetName(),
|
Name: asset.GetName(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user