Bug #18841
closed
Avoid N+1 query in foreman hosts index by declaring proper scope
Added by Shimon Shtein over 7 years ago.
Updated over 6 years ago.
Description
Add this to plugin declaration:
add_controller_action_scope(::Api::V2::HostsController, :index) do |base_scope|
base_scope.includes(:policies)
end
Add similar handling to UI hosts controller too.
- Status changed from New to Ready For Testing
- Assignee set to Shimon Shtein
- Pull request https://github.com/theforeman/foreman_openscap/pull/247 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 225
- Target version set to 1.12.0
- Target version changed from 1.12.0 to 1.12.2
Also available in: Atom
PDF