diff options
author | JakobDev <jakobdev@gmx.de> | 2023-10-11 06:24:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-11 04:24:07 +0000 |
commit | ebe803e514acb4eedc884226be2489ee6b4acd28 (patch) | |
tree | 3f4d38f8267142dcd0e8df7d76cd4fe04c47b85e /modules/doctor | |
parent | 50166d1f7c6df41c79561b094e29c9698c0000d5 (diff) | |
download | gitea-ebe803e514acb4eedc884226be2489ee6b4acd28.tar.gz gitea-ebe803e514acb4eedc884226be2489ee6b4acd28.zip |
Penultimate round of `db.DefaultContext` refactor (#27414)
Part of #27065
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/doctor')
-rw-r--r-- | modules/doctor/mergebase.go | 2 | ||||
-rw-r--r-- | modules/doctor/misc.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/doctor/mergebase.go b/modules/doctor/mergebase.go index e79369e581..de460c4190 100644 --- a/modules/doctor/mergebase.go +++ b/modules/doctor/mergebase.go @@ -74,7 +74,7 @@ func checkPRMergeBase(ctx context.Context, logger log.Logger, autofix bool) erro pr.MergeBase = strings.TrimSpace(pr.MergeBase) if pr.MergeBase != oldMergeBase { if autofix { - if err := pr.UpdateCols("merge_base"); err != nil { + if err := pr.UpdateCols(ctx, "merge_base"); err != nil { logger.Critical("Failed to update merge_base. ERROR: %v", err) return fmt.Errorf("Failed to update merge_base. ERROR: %w", err) } diff --git a/modules/doctor/misc.go b/modules/doctor/misc.go index e01c3e109b..f0b5966b54 100644 --- a/modules/doctor/misc.go +++ b/modules/doctor/misc.go @@ -74,7 +74,7 @@ func checkHooks(ctx context.Context, logger log.Logger, autofix bool) error { func checkUserStarNum(ctx context.Context, logger log.Logger, autofix bool) error { if autofix { - if err := models.DoctorUserStarNum(); err != nil { + if err := models.DoctorUserStarNum(ctx); err != nil { logger.Critical("Unable update User Stars numbers") return err } |