mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
[doctor] do not update User Stars numbers unless --fix (#19750)
This commit is contained in:
parent
ad551bffc1
commit
c27268db21
1 changed files with 8 additions and 3 deletions
|
@ -75,10 +75,15 @@ 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 {
|
||||
logger.Critical("Unable update User Stars numbers")
|
||||
return err
|
||||
}
|
||||
logger.Info("Updated User Stars numbers.")
|
||||
} else {
|
||||
logger.Info("No check available for User Stars numbers (skipped)")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue