just checking for existence is enough here

This commit is contained in:
Régis Hanol 2016-11-30 23:41:07 +01:00
parent 28b7ef7142
commit 453d149182
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ SQL
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
TopicLink.create!(post_id: post.id,
user_id: post.user_id,