mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
just checking for existence is enough here
This commit is contained in:
parent
28b7ef7142
commit
453d149182
@ -163,7 +163,7 @@ SQL
|
|||||||
|
|
||||||
added_urls << url
|
added_urls << url
|
||||||
|
|
||||||
unless TopicLink.find_by(topic_id: post.topic_id, post_id: post.id, url: url)
|
unless TopicLink.exists?(topic_id: post.topic_id, post_id: post.id, url: url)
|
||||||
begin
|
begin
|
||||||
TopicLink.create!(post_id: post.id,
|
TopicLink.create!(post_id: post.id,
|
||||||
user_id: post.user_id,
|
user_id: post.user_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user