mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
select less data
This commit is contained in:
parent
a51386a280
commit
4486879fd2
@ -91,7 +91,9 @@ module HasCustomFields
|
||||
|
||||
fk = (name.underscore << "_id")
|
||||
|
||||
"#{name}CustomField".constantize.where("#{fk} in (?)", map.keys)
|
||||
"#{name}CustomField".constantize
|
||||
.where("#{fk} in (?)", map.keys)
|
||||
.where("name in (?)", fields)
|
||||
.pluck(fk, :name, :value).each do |id, name, value|
|
||||
|
||||
preloaded = map[id].preloaded_custom_fields
|
||||
|
Loading…
Reference in New Issue
Block a user