FIX: posts would not auto rebake unless gravatar download was enabled

This commit is contained in:
Sam 2018-12-07 17:03:22 +11:00
parent 031c252cd3
commit 8e307e633e
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ module Jobs
TopicTimer.ensure_consistency!
# Forces rebake of old posts where needed, as long as no system avatars need updating
unless UserAvatar.where("last_gravatar_download_attempt IS NULL").limit(1).first
if !SiteSetting.automatically_download_gravatars || !UserAvatar.where("last_gravatar_download_attempt IS NULL").limit(1).first
problems = Post.rebake_old(SiteSetting.rebake_old_posts_count)
problems.each do |hash|
post_id = hash[:post].id