Skip to content

Commit

Permalink
pydatnic 2.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalik committed Sep 17, 2024
1 parent 3584a26 commit 32d5df4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ninja/openapi/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ def flatten_properties(
if len(prop_details["allOf"]) == 1 and "enum" in prop_details["allOf"][0]:
# is_required = "default" not in prop_details
yield prop_name, prop_details, prop_required
else:
# pragma: no cover
else: # pragma: no cover
# TODO: this code was for pydanitc 1.7+ ... <2.9 - check if this is still needed
for item in prop_details["allOf"]:
yield from flatten_properties("", item, True, definitions)
Expand Down

0 comments on commit 32d5df4

Please sign in to comment.