mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
FIX: Don't raise an error if the user is not present
This commit is contained in:
@ -4,7 +4,7 @@ module Jobs
|
|||||||
class SendAdvancedTutorialMessage < ::Jobs::Base
|
class SendAdvancedTutorialMessage < ::Jobs::Base
|
||||||
def execute(args)
|
def execute(args)
|
||||||
user = User.find_by(id: args[:user_id])
|
user = User.find_by(id: args[:user_id])
|
||||||
raise Discourse::InvalidParameters.new(:user_id) if user.nil?
|
return if user.nil?
|
||||||
|
|
||||||
PostCreator.create!(
|
PostCreator.create!(
|
||||||
Discourse.system_user,
|
Discourse.system_user,
|
||||||
|
Reference in New Issue
Block a user