Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #594 for roles with blank spaces in the name #595

Merged
merged 1 commit into from
May 4, 2023

Conversation

adonisgarciac
Copy link
Contributor

What does this PR do?

Fix issue #594. Role name has blank spaces for role types:

"project_admin"
"inventory_admin"
"credential_admin"
"workflow_admin"
"notification_admin"
"job_template_admin"
"execution_environment_admin"

It can be checked going to the API and look for some role with one of this type.

This role name is setting as role in the plugin controller_object_diff.py:

item.update({"role": item["name"].lower()})

And this value is not valid so we need no change the blank spaces for underscores:

item.update({"role": item["name"].lower().replace(" ", "_")})

How should this be tested?

>>> my_string = "This is a sample String"
>>> my_string = my_string.lower().replace(" ", "_")
>>> print(my_string)
this_is_a_sample_string

Is there a relevant Issue open for this?

#594

@adonisgarciac
Copy link
Contributor Author

I can't add reviewers but I'd like @ivarmu can check this change 😃

Copy link
Contributor

@ivarmu ivarmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@djdanielsson djdanielsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@djdanielsson djdanielsson merged commit 6f3b480 into redhat-cop:devel May 4, 2023
@adonisgarciac adonisgarciac deleted the issue_594 branch August 11, 2023 10:19
przemkalit pushed a commit to przemkalit/aap_configuration that referenced this pull request Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants