mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
FIX: Update category tag stats with new or deleted (#21531)
The old method updated only existing records, without considering that new tags might have been created or some tags might not exist anymore. This was usually not a problem because the stats were also updated by other code paths. However, the ensure consistency job should be more solid and help when other code paths fail or after importing data. Also, update category tag stats too should happen when updating other category stats as well.
This commit is contained in:
@ -24,6 +24,7 @@ task "categories:move_topics", %i[from_category to_category] => [:environment] d
|
||||
|
||||
puts "Updating category stats..."
|
||||
Category.update_stats
|
||||
CategoryTagStat.update_topic_counts
|
||||
end
|
||||
|
||||
puts "", "Done!", ""
|
||||
|
Reference in New Issue
Block a user