Skip to content

Commit

Permalink
FIX: Don't throw exception if welcome topic cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Aug 15, 2018
1 parent 243fc9d commit 7b089f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/introduction_updater.rb
Expand Up @@ -34,7 +34,7 @@ def find_welcome_post
topic_id = Topic.listable_topics.where(slug: 'welcome-to-discourse').pluck(:id)
end

welcome_topic = Topic.find(topic_id).first
welcome_topic = Topic.where(id: topic_id).first
return nil unless welcome_topic.present?

post = welcome_topic.posts.where(post_number: 1).first
Expand Down

0 comments on commit 7b089f7

Please sign in to comment.