Skip to content

bugfix(SPSTRAT-601): VHDPushItem model _from_data - #676

Merged
rbikar merged 1 commit into
release-engineering:masterfrom
JAVGan:fix_vhd_support_legacy_from_data
Sep 22, 2025
Merged

bugfix(SPSTRAT-601): VHDPushItem model _from_data#676
rbikar merged 1 commit into
release-engineering:masterfrom
JAVGan:fix_vhd_support_legacy_from_data

Conversation

@JAVGan

@JAVGan JAVGan commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

This commit fixes a bad converter for support_legacy on VHDPushItem model which was preventing to load its class using _from_data whenever the value for support_legacy was False.

In the previous version the following line would evaluate the truthful to else and cause the or to define it as None, generating an invalid parameter:

"support_legacy": data.get("support_legacy") or None,

Besides the fix it also includes a new model test to detect this scenario as well as a test on Pub source which reproduces this issue in the previous code.

Refers to SPSTRAT-601

This commit fixes a bad converter for `support_legacy` on `VHDPushItem`
model which was preventing to load its class using `_from_data` whenever
the value for `support_legacy` was `False`.

In the previous version the following line would evaluate the truthful
to `else` and cause the `or` to define it as `None`, generating an
invalid parameter:

```
"support_legacy": data.get("support_legacy") or None,
```

Besides the fix it also includes a new model test to detect this
scenario as well as a test on `Pub` source which reproduces this issue
in the previous code.

Refers to SPSTRAT-601

Signed-off-by: Jonathan Gangi <jgangi@redhat.com>
@JAVGan

JAVGan commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

@lslebodn @rbikar PTAL

@lslebodn lslebodn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@JAVGan

JAVGan commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

@rbikar feel free to merge it as I don't have permissions 🙂

@rbikar
rbikar merged commit 66f1cca into release-engineering:master Sep 22, 2025
6 checks passed
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