Project

General

Profile

« Previous | Next » 

Revision 7e86b53e

Added by Thomas McKay almost 10 years ago

fixes #6519 - updating associations UI

View differences:

app/models/katello/glue/candlepin/pool.rb
end
def products
Product.where(:cp_id => provided_products.map { |prod| prod[:productId] })
Katello::Product.where(:cp_id => provided_products.map { |prod| prod[:productId] })
end
def systems
......
end
def activation_keys
# TODO: no longer valid - error thrown here now
ActivationKey.joins(:pools).where("#{self.class.table_name}.cp_id" => cp_id)
keys = Resources::Candlepin::ActivationKey.get(nil, "?include=id&include=pools.pool.id")
activation_key_ids = keys.collect do |key|
key['id'] if key['pools'].any? { |pool| pool['pool']['id'] == cp_id }
end
return Katello::ActivationKey.where(:cp_id => activation_key_ids.compact)
end
def distributors

Also available in: Unified diff