Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: forward ref with nested models and optional fields (#1752)
* fix: forward ref with nested models and optional fields PR #1712 introduced a regression for forward refs in `ModelField.prepare` as it would not return early for forward refs anymore. Optional fields would hence have `required` set to `True`. closes #1736 * test: skip python 3.6 as __future__.annotations is not defined
- Loading branch information
1 parent
d5e9d9a
commit a2fc01a
Showing
3 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix behaviour with forward refs and optional fields in nested models |
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
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