Bug #29056
closedHammer filter create fails if default organization is set.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1778945
Description of problem:
Hammer filter create does not work if default organization is set.
Version-Release number of selected component (if applicable):
Satellite 6.4
How reproducible:
100%
Steps to Reproduce:
1. Create a role with an organization
- hammer role create --name test2 --organization "Default Organization"
2. Set the Default Organization
- cat .hammer/defaults.yml
---
:defaults:
:organization:
:value: Default Organization
:organization_id:
:value: '1'
3. Try to create the filter for this role, It will fail with error
- hammer filter create --role test --search 'name = testfilter' --permissions view_organizations
Could not create the permission filter:
Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.
4. Now remove the defaults file then it will work.
- mv .hammer/defaults.yml /tmp/
- hammer filter create --role test --search 'name = testfilter' --permissions view_organizations
Permission filter for [Organization] created.
Actual results:
Hammer fails to create the filter if default organization is set.
Expected results:
Hammer should be able to create the filter if default organization is set.
Additional Info:-
Same issue is also reproducible on Satellite 6.6