0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-24 11:34:36 +01:00

Use correct context to get package content (#20673)

This commit is contained in:
KN4CK3R 2022-08-04 23:14:47 +02:00 committed by GitHub
parent 7cc7c3e449
commit b678d1adae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}