Browse Source

Use correct context to get package content (#20673)

pull/20675/head
KN4CK3R 1 week ago committed by GitHub
parent
commit
b678d1adae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      services/packages/packages.go

2
services/packages/packages.go

@ -450,7 +450,7 @@ func GetFileStreamByPackageVersionAndFileID(ctx context.Context, owner *user_mod
// GetFileStreamByPackageVersion returns the content of the specific package file
func GetFileStreamByPackageVersion(ctx context.Context, pv *packages_model.PackageVersion, pfi *PackageFileInfo) (io.ReadCloser, *packages_model.PackageFile, error) {
pf, err := packages_model.GetFileForVersionByName(db.DefaultContext, pv.ID, pfi.Filename, pfi.CompositeKey)
pf, err := packages_model.GetFileForVersionByName(ctx, pv.ID, pfi.Filename, pfi.CompositeKey)
if err != nil {
return nil, nil, err
}

Loading…
Cancel
Save