From 92d79b556bfcd4dfb4da3180ee2f099ad071d02d Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Fri, 5 Aug 2022 20:55:16 +0200 Subject: [PATCH] Use correct context to get package content (#20673) (#20676) Co-authored-by: Lunny Xiao --- 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 312f7812b34..985d06a1b28 100644 --- a/services/packages/packages.go +++ b/services/packages/packages.go @@ -448,7 +448,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 }