diff --git a/app/jobs/onceoff/grand_first_reply_by_email.rb b/app/jobs/onceoff/grand_first_reply_by_email.rb index 12fbb86e567..1d97091eb6b 100644 --- a/app/jobs/onceoff/grand_first_reply_by_email.rb +++ b/app/jobs/onceoff/grand_first_reply_by_email.rb @@ -2,6 +2,7 @@ module Jobs class GrantFirstReplyByEmail < Jobs::Onceoff def execute_onceoff(args) + return unless SiteSetting.enable_badges to_award = {} Post.select(:id, :created_at, :user_id) diff --git a/app/jobs/onceoff/grant_emoji.rb b/app/jobs/onceoff/grant_emoji.rb index 3b9608ec578..a5feabef16f 100644 --- a/app/jobs/onceoff/grant_emoji.rb +++ b/app/jobs/onceoff/grant_emoji.rb @@ -2,6 +2,7 @@ module Jobs class GrantEmoji < Jobs::Onceoff def execute_onceoff(args) + return unless SiteSetting.enable_badges to_award = {} Post.secured(Guardian.new) diff --git a/app/jobs/onceoff/grant_onebox.rb b/app/jobs/onceoff/grant_onebox.rb index 3dadbd16d3c..9ce0f6fd00f 100644 --- a/app/jobs/onceoff/grant_onebox.rb +++ b/app/jobs/onceoff/grant_onebox.rb @@ -4,6 +4,7 @@ module Jobs sidekiq_options queue: 'low' def execute_onceoff(args) + return unless SiteSetting.enable_badges to_award = {} Post.secured(Guardian.new)