Skip to content

Commit

Permalink
Fixes #36835 - host applicable errata filter too slow
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Oct 31, 2023
1 parent c90b9a0 commit 2653d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/katello/erratum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def self.applicable_to_hosts(hosts)
# It is not the errata "belonging" to the host. Its rather the errata that is "applicable"
# which is calculated elsewhere.

self.joins(:content_facets).
self.group(:id).distinct.joins(:content_facets).
where("#{Katello::Host::ContentFacet.table_name}.host_id" => hosts.select(:id))
end

Expand Down

0 comments on commit 2653d8c

Please sign in to comment.