update is not really needed

This commit is contained in:
Sam 2016-06-10 17:25:37 +10:00
parent 65f466cf8c
commit 9e75b14535

View file

@ -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),