mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
update is not really needed
This commit is contained in:
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user