Skip to content

Commit

Permalink
Refs #29647 - remove implicit scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll authored and jlsherrill committed May 4, 2020
1 parent 54608e1 commit e39a522
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/katello/erratum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def self.of_type(type)
scope :security, -> { of_type(Erratum::SECURITY) }
scope :bugfix, -> { of_type(Erratum::BUGZILLA) }
scope :enhancement, -> { of_type(Erratum::ENHANCEMENT) }
scope :modular, -> { where(:id => Erratum.joins(:packages => :module_stream_errata_packages)) }
scope :modular, -> { where(:id => joins(:packages => :module_stream_errata_packages)) }
scope :non_modular, -> { where.not(:id => modular) }

def self.content_facet_association_class
Expand Down
2 changes: 1 addition & 1 deletion app/models/katello/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def used_by_another_org?
self.class.where(["cp_id = ? AND id != ?", cp_id, id]).count > 0
end

scope :all_in_org, ->(org) { Product.joins(:provider).where("#{Katello::Provider.table_name}.organization_id = ?", org.id) }
scope :all_in_org, ->(org) { joins(:provider).where("#{Katello::Provider.table_name}.organization_id = ?", org.id) }

def assign_unique_label
self.label = Util::Model.labelize(self.name) if self.label.blank?
Expand Down

0 comments on commit e39a522

Please sign in to comment.