FIX: Don't include reflections when checking for duplication topic links.

This commit is contained in:
Guo Xiang Tan
2016-06-13 13:13:39 +08:00
parent 8c3e63f87a
commit 1fe499e893
2 changed files with 29 additions and 1 deletions

View File

@@ -233,7 +233,8 @@ class TopicLink < ActiveRecord::Base
results = TopicLink
.includes(:post => :user)
.where(topic_id: topic.id).limit(200)
.where(topic_id: topic.id, reflection: false)
.limit(200)
lookup = {}
results.each do |tl|