FIX: Cached badge_count isn't updated after backfilling badges (#11281)

FIX: Cached badge_count isn’t updated after backfilling badges (#11281)

diff --git a/app/jobs/scheduled/badge_grant.rb b/app/jobs/scheduled/badge_grant.rb
index 8e40939..e9ad67a 100644
--- a/app/jobs/scheduled/badge_grant.rb
+++ b/app/jobs/scheduled/badge_grant.rb
@@ -23,6 +23,7 @@ module Jobs
 
       BadgeGranter.revoke_ungranted_titles!
       UserBadge.ensure_consistency! # Badge granter sometimes uses raw SQL, so hooks do not run. Clean up data
+      UserStat.update_distinct_badge_count
     end
 
   end

GitHub sha: 333f0af0

This commit appears in #11281 which was approved by eviltrout. It was merged by gschlager.