FIX: Don't raise an error if the user is not present

This commit is contained in:
romanrizzi 2019-12-11 11:03:31 -03:00
parent e5ce2d97f6
commit 5431ae0a17
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module Jobs
class SendAdvancedTutorialMessage < ::Jobs::Base
def execute(args)
user = User.find_by(id: args[:user_id])
raise Discourse::InvalidParameters.new(:user_id) if user.nil?
return if user.nil?
PostCreator.create!(
Discourse.system_user,