Skip to content

Commit

Permalink
Use correct context to get package content (#20673) (#20676)
Browse files Browse the repository at this point in the history
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
  • Loading branch information
KN4CK3R and lunny authored Aug 5, 2022
1 parent 65176fd commit 92d79b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/packages/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 92d79b5

Please sign in to comment.