Open
Conversation
…ment." This reverts commit 749c3b8.
Also, when a value is optional, it might not be provided and no value should be added.
# Conflicts: # sqlalchemy_pydantic_orm/main.py
Owner
|
This is quite a large chunk for me to review because I have to rethink why I made certain decisions, like choosing Splitting the merge request up would help a lot. So each point you mentioned in it's own MR; same for spelling corrections. Thank you for your understanding. |
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.
My code intend to correct few issues.
1
Nested elements might not be created / updated when the parent element is.
My code allow a mix of update and create element in the entire hierarchy.
A new element can contain an existing one for example.
2
In some cases, the self.fields_set variable doesn't contain some element. In my case, it was a list issued by a foreign key.
It might be a bug in pydantic, but in order to prevent that issue, I pushed a change to use fields instead.
3 The code is now also compatible with Optional elements without default value.
It was not working fully in the case a List element was optional, without a default value.(it was trying to insert None, leading to an exception
please tell me if my code needs improvements.
Regards,
Pierre