diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-08-04 23:14:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-04 16:14:47 -0500 |
commit | b678d1adae759a6a5f3108b0d467d9fe79b6a19b (patch) | |
tree | 7a768acf2fa934d14b01b9301991e476ad273b7c /services/packages | |
parent | 7cc7c3e449ae37355196695ba6a7ae2bb1cc9b27 (diff) | |
download | gitea-b678d1adae759a6a5f3108b0d467d9fe79b6a19b.tar.gz gitea-b678d1adae759a6a5f3108b0d467d9fe79b6a19b.zip |
Use correct context to get package content (#20673)
Diffstat (limited to 'services/packages')
-rw-r--r-- | services/packages/packages.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/packages/packages.go b/services/packages/packages.go index 975c5ddd35..4bc31a34e8 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 } |