FIX: Flagged Post custom fields were not respecting type
This commit is contained in:
parent
357df2ff4f
commit
410b0f591f
|
@ -140,13 +140,7 @@ module FlagQuery
|
||||||
post_custom_field_names << field if plugin.enabled?
|
post_custom_field_names << field if plugin.enabled?
|
||||||
end
|
end
|
||||||
|
|
||||||
post_custom_fields = {}
|
post_custom_fields = Post.custom_fields_for_ids(post_ids, post_custom_field_names)
|
||||||
if post_custom_field_names.present?
|
|
||||||
PostCustomField.where(post_id: post_ids, name: post_custom_field_names).each do |f|
|
|
||||||
post_custom_fields[f.post_id] ||= {}
|
|
||||||
post_custom_fields[f.post_id][f.name] = f.value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# maintain order
|
# maintain order
|
||||||
posts = post_ids.map { |id| post_lookup[id] }
|
posts = post_ids.map { |id| post_lookup[id] }
|
||||||
|
|
Loading…
Reference in New Issue