Bug 719736 - UI breaks after deleting ACME_Corporation
Summary: UI breaks after deleting ACME_Corporation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-07-07 19:52 UTC by Adam Price
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:48:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Adam Price 2011-07-07 19:52:41 UTC
Description of problem:
The UI breaks after deleting an organization with ID=1


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


How reproducible:


Steps to Reproduce:
1. create 'foo_org' organization
2. delete ACME_Corporation
3. select 'foo_org' (fails to retrieve information)
4. reload http://localhost:3000 (or base URL for katello instance)
5. katello explodes
  
Actual results:

ActiveRecord::RecordNotFound in DashboardController#index
Couldn't find Organization with ID=1

Expected results:

page loads without exploding.

Additional info:

Comment 1 Corey Welton 2011-07-08 22:58:50 UTC
I swear this is a dupe or a regression of a bug we have somewhere about deleting org 1, but I can't find it.

Comment 2 Corey Welton 2011-07-08 23:02:03 UTC
...and somehow after a bunch of futile searching, and posting the comment above, I just found it in about ten seconds.


https://bugzilla.redhat.com/show_bug.cgi?id=706266

So this was fixed about a month ago. Did it rear its head again?

Comment 3 Corey Welton 2011-07-11 18:42:12 UTC
Able to repro.

Comment 4 Partha Aji 2011-07-25 23:37:29 UTC
So fixed this the following way. So one can no longer delete the current organization in Katello. They can delete other organizations. You will have to switch to a different org before deleting ACME. This is because we dont want katello to pick a random org of users as the current when the delete happens.

Anyway you will be able to only really test this when we provide the ability to switch orgs in Katello. For now you can see that the remove link won't be for the current org and even if you tried deleting the current org from the UI by faking the request you'll get an error saying you can't do that.

Fixed as of
http://git.fedorahosted.org/git/?p=katello.git;a=commit;h=3acb5a25bc38fa61767f5083971790655f216d93
and 

http://git.fedorahosted.org/git/?p=katello.git;a=commit;h=8b325c5a277d9ba6228589296172f075b12afe24

Comment 5 Jeff Weiss 2011-09-22 02:45:50 UTC
Verified.  Can no longer delete the current org.  I was able to switch to a different org, delete ACME_Corporation with no ill effect.  I then recreated ACME_Corporation and was able to switch back to it.

katello-0.1.83-1.git.43.0db4170.fc14.noarch


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