more context for models (#19511)
make more usage of context, to have more db transaction in one session (make diff of #9307 smaller)
This commit is contained in:
@ -27,7 +27,7 @@ import (
|
||||
|
||||
// DownloadDiffOrPatch will write the patch for the pr to the writer
|
||||
func DownloadDiffOrPatch(ctx context.Context, pr *models.PullRequest, w io.Writer, patch, binary bool) error {
|
||||
if err := pr.LoadBaseRepo(); err != nil {
|
||||
if err := pr.LoadBaseRepoCtx(ctx); err != nil {
|
||||
log.Error("Unable to load base repository ID %d for pr #%d [%d]", pr.BaseRepoID, pr.Index, pr.ID)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user