Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 726402

Summary: Systems->Registered->Environments - nil object error generated when there are no systems
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: WebUIAssignee: Shannon Hughes <shughes>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: sghai, shughes
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 17:50:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 747354    

Description Brad Buckingham 2011-07-28 13:54:59 UTC
Description of problem:

When accessing the Systems->Registered->Environments, if there are no systems registered an error notice is displayed indicating a nil object was encountered.  

Version-Release number of selected component (if applicable):
git master

How reproducible:
always

Steps to Reproduce:
1. clear-all.sh (to clear the systems)
2. script/rails s
3. go to Systems->Registered->Environments
  
Actual results:
Page loads and following error notice is generated:

You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.first

Expected results:
Page loads and not error notice is generated (i.e. we should internally handle the nil).

Additional info:

Comment 1 Sachin Ghai 2011-08-19 12:19:19 UTC
Verified this with following build:
root@dhcp201-207 katello]# rpm -qa | grep katello
katello-cli-0.1.4-1.git.63.54683c2.fc15.noarch
katello-0.1.64-1.git.0.0b431ff.fc15.noarch

I verified this on freshly installed system, no error is reproducible under 
Systems->Registered->Environments.

To confirm this, I registered a system from cli and then unregistered it. And checked the Systems->Registered->Environments from webUI. Again the reported error is no longer reproducible.