mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 05:01:44 +08:00
select less data
This commit is contained in:
parent
a51386a280
commit
4486879fd2
|
@ -91,7 +91,9 @@ module HasCustomFields
|
||||||
|
|
||||||
fk = (name.underscore << "_id")
|
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|
|
.pluck(fk, :name, :value).each do |id, name, value|
|
||||||
|
|
||||||
preloaded = map[id].preloaded_custom_fields
|
preloaded = map[id].preloaded_custom_fields
|
||||||
|
|
Loading…
Reference in New Issue
Block a user