Bug #25277
closedListing report fails after adding default organization/location
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1632899
Description of problem: After adding default organization/location, Listing reports fails with error "Association not found for organization/location"
Version-Release number of selected component (if applicable): Satellite 6.4
satellite-6.4.0-14.el7sat.noarch
How reproducible: Always
Steps to Reproduce:
[root@satellite64 ~]# hammer organization list
---|----------------------|----------------------|-------------|----------------------
ID | TITLE | NAME | DESCRIPTION | LABEL
---|----------------------|----------------------|-------------|----------------------
1 | Default Organization | Default Organization | | Default_Organization
---|----------------------|----------------------|-------------|----------------------
[root@satellite64 ~]# hammer defaults list
----------------|------
PARAMETER | VALUE
----------------|------
organization_id | 1
----------------|------
[root@satellite64 ~]# hammer report list
Association not found for organization
Actual results: Failed to list report
Expected results: Should list reports
Additional info:
This is working in satellite 6.3
Applied the patch https://github.com/theforeman/foreman/pull/6075 but still failing
Production log:
2018-09-25T22:47:20 [W|app|823fe] Action failed
RuntimeError: Association not found for location
/usr/share/foreman/app/controllers/api/base_controller.rb:79:in `parent_scope'
/usr/share/foreman/app/controllers/api/base_controller.rb:64:in `resource_scope'
/usr/share/foreman/app/controllers/api/v2/reports_controller.rb:74:in `resource_scope'
/usr/share/foreman/app/controllers/api/base_controller.rb:104:in `resource_scope_for_index'
/usr/share/foreman/app/controllers/api/v2/reports_controller.rb:16:in `index'
Updated by Lukas Zapletal about 6 years ago
- Subject changed from Listing report fails after adding default organization/location to Listing report fails after adding default organization/location
- Triaged changed from No to Yes
Updated by The Foreman Bot about 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6106 added
Updated by The Foreman Bot about 6 years ago
- Pull request https://github.com/theforeman/foreman/pull/6306 added
Updated by Tomer Brisker about 6 years ago
- Pull request deleted (
https://github.com/theforeman/foreman/pull/6106) - Fixed in Releases 1.21.0 added
Updated by Sebastian Gräßl about 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 4cf21db0566dfb6a71fd1bbc45aa53abedf351d3.