mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	[doctor] do not update User Stars numbers unless --fix (#19750)
This commit is contained in:
		@@ -75,9 +75,14 @@ func checkHooks(ctx context.Context, logger log.Logger, autofix bool) error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func checkUserStarNum(ctx context.Context, logger log.Logger, autofix bool) error {
 | 
			
		||||
	if err := models.DoctorUserStarNum(); err != nil {
 | 
			
		||||
		logger.Critical("Unable update User Stars numbers")
 | 
			
		||||
		return err
 | 
			
		||||
	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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user