Bug 726402 - Systems->Registered->Environments - nil object error generated when there are no systems
Summary: Systems->Registered->Environments - nil object error generated when there are...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: Shannon Hughes
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-07-28 13:54 UTC by Brad Buckingham
Modified: 2019-09-26 13:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 17:50:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.