From 557dc76c07d0c713eaff8eb649e4ba2e31c97adf Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 12 May 2014 15:50:44 +1000 Subject: [PATCH] BUGFIX: failing avatar detection job --- app/jobs/scheduled/detect_avatars.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/jobs/scheduled/detect_avatars.rb b/app/jobs/scheduled/detect_avatars.rb index 0d4ff68a8..b3034b49a 100644 --- a/app/jobs/scheduled/detect_avatars.rb +++ b/app/jobs/scheduled/detect_avatars.rb @@ -10,6 +10,7 @@ module Jobs # Find a random sampling of users of trust level 1 or higher who don't have a custom avatar. user_stats = UserStat.where('user_stats.has_custom_avatar = false AND users.trust_level > 0') + .references(:user) .includes(:user) .order("random()") .limit(SiteSetting.max_daily_gravatar_crawls)