FIX: Use TopicList's preloaded_custom_fields.

This commit is contained in:
Dan Ungureanu 2019-10-21 19:42:04 +03:00
parent d4d249d525
commit 1a041b49e0
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ module DiscourseAssign
.offset(offset)
.limit(limit)
Topic.preload_custom_fields(topics, [TopicAssigner::ASSIGNED_TO_ID])
Topic.preload_custom_fields(topics, TopicList.preloaded_custom_fields)
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))