fix issue #594 for roles with blank spaces in the name #595
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
Is there a relevant Issue open for this?
#594