From 9e75b14535b401346ac6547d883d9b3901407eec Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 10 Jun 2016 17:25:37 +1000 Subject: [PATCH] update is not really needed --- app/models/topic_link.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/models/topic_link.rb b/app/models/topic_link.rb index 786c5e625..08114bfae 100644 --- a/app/models/topic_link.rb +++ b/app/models/topic_link.rb @@ -183,11 +183,7 @@ class TopicLink < ActiveRecord::Base post_id: reflected_post.try(:id), url: reflected_url) - if tl - tl.update_columns(domain: Discourse.current_hostname, - link_topic_id: post.topic.id, - link_post_id: post.id) - else + unless tl tl = TopicLink.create(user_id: post.user_id, topic_id: topic_id, post_id: reflected_post.try(:id),