-
Notifications
You must be signed in to change notification settings - Fork 32
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
Update logic related to NestedModelField and fix several bugs #180
Merged
AxeemHaider
merged 5 commits into
octabyte-io:master
from
ADR-007:feature/refactor-code-to-allow-nested-model-in-list
Feb 13, 2023
Merged
Update logic related to NestedModelField and fix several bugs #180
AxeemHaider
merged 5 commits into
octabyte-io:master
from
ADR-007:feature/refactor-code-to-allow-nested-model-in-list
Feb 13, 2023
Conversation
This file contains 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
- Allow NestedModelField in ListField - Allow update/merge with None - Allow update/merge with None nested field - Wrap errors to add error.field path - Fix model.update - Fix memory leak - Set Meta.ignore_none_field=False
This was referenced Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 11, 2023
ADR-007
commented
Feb 12, 2023
Add docs Remove unused code Add list index to error wrapper
There is a couple of more things I want to add to the project, but after this PR :) |
AxeemHaider
approved these changes
Feb 13, 2023
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.
[{a: {b: [{c: {d: 'e'}}]}}]
)__init__
method (bugfix? e.g.MyModel(nested=MyNested())
)... "a.b[0].c.d": field is required
). Most likely, it will not break backward compatibility because there wasn't a base exception class, so most likely no one used particle exception inexcept
statementTrue
value was used to hide bugs inupdate
. But... I think we can ignoreNone
on create but not onupdate
🤔. It is not really clear how it should work. It probably should be "ignore default None, but save if it was set manually"Model
. So, now there is only one place for it, which allows handling nested fields in a more convenient way, and overrides this behavior inNeatedModelField.get_value
method.Do I have a chance to have this merged, or is it too big one? Not sure how to do it in smaller PRs btw.
I would like to use this code in a project I'm currently working on. So, I'll test it on real data as soon I'll know I have a chance to have it merged :)