Project

General

Profile

« Previous | Next » 

Revision 4b2b7c9a

Added by Justin Sherrill about 10 years ago

fixes 4655 - fixing registration to Library attaching to incorrect content view

previously content view environment names were set to the environment name
this would result in a system subscribing to "Library" being subscribed to
a random content view in library. This fix does two things:
  • Sets the content view environment name to be the same as the label
  • Does not use name to identify the content view environment at all

View differences:

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