From b678d1adae759a6a5f3108b0d467d9fe79b6a19b Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Thu, 4 Aug 2022 23:14:47 +0200 Subject: [PATCH] Use correct context to get package content (#20673) --- services/packages/packages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/packages/packages.go b/services/packages/packages.go index 975c5ddd3..4bc31a34e 100644 --- a/services/packages/packages.go +++ b/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 }