Ensure that we skip validations when creating a post on behalf of a user.

This commit is contained in:
Guo Xiang Tan 2017-06-03 07:15:08 +09:00
parent 3acabf3e2f
commit 418cb09713

View File

@ -122,7 +122,8 @@ module DiscourseNarrativeBot
i18n_post_args(discobot_username: self.discobot_user.username)
),
topic_id: data[:topic_id],
skip_bot: true
skip_bot: true,
skip_validations: true
})
set_state_data(:post_id, post.id)
@ -138,7 +139,8 @@ module DiscourseNarrativeBot
i18n_post_args(discobot_username: self.discobot_user.username)
),
topic_id: data[:topic_id],
skip_bot: true
skip_bot: true,
skip_validations: true
})
set_state_data(:post_id, post.id)
@ -305,6 +307,7 @@ module DiscourseNarrativeBot
raw: raw,
topic_id: @topic_id
)
enqueue_timeout_job(@user)
post
end