From fdac8bdd17ff4504a0908666b7df99ddd8726cb3 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 12 Jul 2025 00:33:36 +0800 Subject: [PATCH] fix github migration asset ID nil panic --- services/migrations/github.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/migrations/github.go b/services/migrations/github.go index 2ce11615c6..c6cd6ea173 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -322,7 +322,10 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith httpClient := NewMigrationHTTPClient() 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{ ID: asset.GetID(), Name: asset.GetName(),