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

fixed job template issue with empty survey spec #55

Closed

Conversation

ecchong
Copy link
Contributor

@ecchong ecchong commented Jan 3, 2025

What does this PR do?

filetree_create failed when job template has no survey spec

It seems the query for related survey_spec returns a list with a single empty dictionary, i.e. [{}], which causes the following condition check of survey_spec_contents | length > 0 to pass even there is no survey spec.

This PR added a filter difference([{}]) to remove the empty dictionary from the returned list.

How should this be tested?

Run filetree_create role against job template with no survey spec defined

Is there a relevant Issue open for this?

None

Other Relevant info, PRs, etc

@ivarmu
Copy link
Contributor

ivarmu commented Jan 8, 2025

Duplicated. This is solved at https://github.com/redhat-cop/aap_configuration_extended/pull/51/files#diff-a93146062a168a4cff18194dc3d2a13125cd10f1849e8ad7c869655d8b2417edL208-R208.

Anyway, not sure what approach is better... Open to suggestions here. @djdanielsson

@ivarmu ivarmu added the duplicate This issue or pull request already exists label Jan 8, 2025
@djdanielsson
Copy link
Contributor

because it is a duplicate I will just close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants