IHS-75: Fix cardinality many error message#1044
Open
solababs wants to merge 2 commits into
Open
Conversation
Deploying infrahub-sdk-python with
|
| Latest commit: |
329c647
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5ebfa5af.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://sb-25052026-fix-cardinality.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## stable #1044 +/- ##
==========================================
+ Coverage 81.54% 81.58% +0.03%
==========================================
Files 134 134
Lines 11468 11468
Branches 1735 1735
==========================================
+ Hits 9352 9356 +4
+ Misses 1569 1567 -2
+ Partials 547 545 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Why
Improve error message now names the relationship, states that a list is required, and shows the correction.
Closes #174
Checklist
Summary by cubic
Improves the error shown when a single value is passed to a cardinality-many relationship. The message now names the relationship, says a list is required, shows the received type, and gives an example fix (e.g., tags=[value]).
relationship.pyto raise a clear ValueError in both async and sync constructors when non-list data is provided to a many relationship.Written for commit 329c647. Summary will update on new commits. Review in cubic