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:
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.
...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?
Able to repro.
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
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