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/dont set shortlist if none #331

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Conversation

mike-sul
Copy link
Contributor

@mike-sul mike-sul commented Mar 25, 2024

Do not set the 'shortlist' attribute in the input JSON if the 'shortlist' input parameter is set to 'None'.Otherwise, the input target JSON will be modified to include the 'shortlist: null' field. This is undesirable during app fetching when the target JSON serves solely as a read-only parameter.

E.g.

"origUri": "https://ci.fioed.io/projects/<factory>/lmp/builds/75",
"shortlist": null,
"fetched-apps": {
    "uri": "https://api.fioed.io/projects/<factory>/lmp/builds/80/runs/publish-compose-apps/intel-corei7-64-lmp-80.apps.tar",
    "shortlist": "app-04"
}

Don't set the `shortlist` attribute in the input json if the `shortlist`
input parameter in `None`. Otherwise, the input target json is modified
- the `shortlist: None` field is added to it. It is not desirable during
the app fetching when the target json serves solely as an input
read-only parameter.

Signed-off-by: Mike Sul <[email protected]>
@mike-sul mike-sul force-pushed the fix/dont-set-shortlist-if-none branch from 2c833db to 64fd39f Compare March 25, 2024 12:46
@mike-sul mike-sul requested a review from doanac March 25, 2024 12:47
Copy link
Member

@doanac doanac left a comment

Choose a reason for hiding this comment

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

took me a minute to understand that propery setter trick. lgtm

@mike-sul mike-sul merged commit b1d2a30 into master Mar 25, 2024
2 checks passed
@mike-sul mike-sul deleted the fix/dont-set-shortlist-if-none branch March 25, 2024 13:03
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.

2 participants