bugfix(SPSTRAT-601): VHDPushItem model _from_data - #676
Merged
rbikar merged 1 commit intoSep 22, 2025
Conversation
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
requested review from
chandwanitulsi,
rajulkumar and
rbikar
as code owners
September 19, 2025 18:58
Contributor
Author
rbikar
approved these changes
Sep 22, 2025
Contributor
Author
|
@rbikar feel free to merge it as I don't have permissions 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit fixes a bad converter for
support_legacyonVHDPushItemmodel which was preventing to load its class using_from_datawhenever the value forsupport_legacywasFalse.In the previous version the following line would evaluate the truthful to
elseand cause theorto define it asNone, generating an invalid parameter:Besides the fix it also includes a new model test to detect this scenario as well as a test on
Pubsource which reproduces this issue in the previous code.Refers to SPSTRAT-601