update is not really needed
This commit is contained in:
parent
65f466cf8c
commit
9e75b14535
|
@ -183,11 +183,7 @@ class TopicLink < ActiveRecord::Base
|
||||||
post_id: reflected_post.try(:id),
|
post_id: reflected_post.try(:id),
|
||||||
url: reflected_url)
|
url: reflected_url)
|
||||||
|
|
||||||
if tl
|
unless tl
|
||||||
tl.update_columns(domain: Discourse.current_hostname,
|
|
||||||
link_topic_id: post.topic.id,
|
|
||||||
link_post_id: post.id)
|
|
||||||
else
|
|
||||||
tl = TopicLink.create(user_id: post.user_id,
|
tl = TopicLink.create(user_id: post.user_id,
|
||||||
topic_id: topic_id,
|
topic_id: topic_id,
|
||||||
post_id: reflected_post.try(:id),
|
post_id: reflected_post.try(:id),
|
||||||
|
|
Loading…
Reference in New Issue