mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-23 05:15:45 -04:00
Safer code - check that topic is present.
This commit is contained in:
parent
1715aa66d9
commit
9c461aced4
1 changed files with 2 additions and 1 deletions
|
@ -132,7 +132,8 @@ class PostCreator
|
|||
|
||||
# We need to enqueue jobs after the transaction. Otherwise they might begin before the data has
|
||||
# been comitted.
|
||||
Jobs.enqueue(:feature_topic_users, topic_id: topic.id)
|
||||
Jobs.enqueue(:feature_topic_users, topic_id: topic.id) if topic.present?
|
||||
|
||||
post.trigger_post_process
|
||||
|
||||
post
|
||||
|
|
Loading…
Reference in a new issue