FIX: Use TopicList's preloaded_custom_fields.
This commit is contained in:
parent
d4d249d525
commit
1a041b49e0
|
@ -94,7 +94,7 @@ module DiscourseAssign
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
|
|
||||||
Topic.preload_custom_fields(topics, [TopicAssigner::ASSIGNED_TO_ID])
|
Topic.preload_custom_fields(topics, TopicList.preloaded_custom_fields)
|
||||||
|
|
||||||
users = User
|
users = User
|
||||||
.where("users.id IN (SELECT value::int FROM topic_custom_fields WHERE name = 'assigned_to_id' AND topic_id IN (?))", topics.map(&:id))
|
.where("users.id IN (SELECT value::int FROM topic_custom_fields WHERE name = 'assigned_to_id' AND topic_id IN (?))", topics.map(&:id))
|
||||||
|
|
Loading…
Reference in New Issue