Skip to content

Commit fdac8bd

Browse files
committed
fix github migration asset ID nil panic
1 parent 806f915 commit fdac8bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

services/migrations/github.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,10 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith
322322
httpClient := NewMigrationHTTPClient()
323323

324324
for _, asset := range rel.Assets {
325-
assetID := *asset.ID // Don't optimize this, for closure we need a local variable
325+
assetID := asset.GetID() // Don't optimize this, for closure we need a local variable TODO: no need to do so in new Golang
326+
if assetID == 0 {
327+
continue
328+
}
326329
r.Assets = append(r.Assets, &base.ReleaseAsset{
327330
ID: asset.GetID(),
328331
Name: asset.GetName(),

0 commit comments

Comments
 (0)