Navigation Menu

Skip to content

Commit

Permalink
fixes #12123 - content_unit_class should be constantized
Browse files Browse the repository at this point in the history
  • Loading branch information
stbenjam committed Oct 12, 2015
1 parent 21aaff4 commit e9edcbe
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/concerns/pulp_database_unit.rb
Expand Up @@ -13,7 +13,7 @@ def backend_data

module ClassMethods
def content_unit_class
"::Pulp::#{self.name.demodulize}"
"::Katello::Pulp::#{self.name.demodulize}".constantize
end

def repository_association
Expand Down
2 changes: 1 addition & 1 deletion app/services/katello/pulp/pulp_content_unit.rb
Expand Up @@ -42,7 +42,7 @@ def self.fetch_by_uuids(uuids)
end

def self.fetch(offset, page_size, uuids = nil)
fields = ::PULP_INDEXED_FIELDS if self.constants.include?(:PULP_INDEXED_FIELDS)
fields = self.const_get(:PULP_INDEXED_FIELDS) if self.constants.include?(:PULP_INDEXED_FIELDS)
criteria = {:limit => page_size, :skip => offset}
criteria[:fields] = fields if fields
criteria[:filters] = {'_id' => {'$in' => uuids}} if uuids
Expand Down

0 comments on commit e9edcbe

Please sign in to comment.