Project

General

Profile

Bug #29056

Hammer filter create fails if default organization is set.

Added by Shira Maximov about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

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

  1. hammer role create --name test2 --organization "Default Organization"

2. Set the Default Organization

  1. 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

  1. 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.

  1. mv .hammer/defaults.yml /tmp/
  1. 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


Related issues

Related to Foreman - Bug #29065: Hammer filter create fails if default location is set.Closed

Associated revisions

Revision 50af07da (diff)
Added by Shira Maximov about 1 month ago

Fixes #29056 - Fix API filter creation in case of organization_id exists

History

#1 Updated by The Foreman Bot about 1 month ago

  • Assignee set to Shira Maximov
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7447 added

#2 Updated by Tomer Brisker about 1 month ago

  • Related to Bug #29065: Hammer filter create fails if default location is set. added

#3 Updated by The Foreman Bot about 1 month ago

  • Fixed in Releases 2.1.0 added

#4 Updated by Shira Maximov about 1 month ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF