diff --git a/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb b/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb index 8e0312498f9..1b0036b9336 100644 --- a/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +++ b/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb @@ -332,9 +332,9 @@ def find_content_view_environments end elsif params.key?(:organization_id) && !params.key?(:environment_id) && !params.key?(:environments) organization = Organization.current - environments = organization.library.content_view_environment + environments = [organization.library.content_view_environment] elsif User.current.default_organization.present? - environments = User.current.default_organization.library.content_view_environment + environments = [User.current.default_organization.library.content_view_environment] else fail HttpErrors::NotFound, _("User '%s' did not specify an organization ID and does not have a default organization.") % current_user.login end