From 32d5df48293a7774466c257a79f09495efc404ce Mon Sep 17 00:00:00 2001 From: Vitaliy Kucheryaviy Date: Tue, 17 Sep 2024 11:53:57 +0300 Subject: [PATCH] pydatnic 2.9 compatibility --- ninja/openapi/schema.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ninja/openapi/schema.py b/ninja/openapi/schema.py index 65405948..856c776a 100644 --- a/ninja/openapi/schema.py +++ b/ninja/openapi/schema.py @@ -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)