Revision 4b2b7c9a
Added by Justin Sherrill about 10 years ago
app/models/katello/content_view.rb | ||
---|---|---|
# candlepin to become aware that the view is available for consumers.
|
||
def add_environment(env)
|
||
if self.content_view_environments.where(:environment_id => env.id).empty?
|
||
ContentViewEnvironment.create!(:name => env.name,
|
||
:label => self.generate_cp_environment_label(env),
|
||
label = self.generate_cp_environment_label(env)
|
||
ContentViewEnvironment.create!(:name => label,
|
||
:label => label,
|
||
:cp_id => self.generate_cp_environment_id(env),
|
||
:environment_id => env.id,
|
||
:content_view => self)
|
Also available in: Unified diff
fixes 4655 - fixing registration to Library attaching to incorrect content view
previously content view environment names were set to the environment namethis would result in a system subscribing to "Library" being subscribed to
a random content view in library. This fix does two things: