mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
FIX: ensure Badge consistency
This commit is contained in:
@ -12,6 +12,7 @@ module Jobs
|
||||
PostRevision.ensure_consistency!
|
||||
UserStat.update_view_counts(13.hours.ago)
|
||||
Topic.ensure_consistency!
|
||||
Badge.ensure_consistency!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -310,6 +310,10 @@ SQL
|
||||
end
|
||||
end
|
||||
|
||||
def self.ensure_consistency!
|
||||
Badge.find_each(&:reset_grant_count!)
|
||||
end
|
||||
|
||||
protected
|
||||
def ensure_not_system
|
||||
unless id
|
||||
|
Reference in New Issue
Block a user