We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10588f1 commit 45b816eCopy full SHA for 45b816e
openapi_python_client/templates/property_templates/union_property.py.jinja
@@ -68,8 +68,8 @@ elif {{ source }} is None:
68
{% endif %}
69
{% set has_first_clause = false %}
70
{% if loop.first and property.required and not property.nullable %}{# No if UNSET or if None statement before this #}
71
- {% set has_first_clause = true %}
72
if isinstance({{ source }}, {{ inner_property.get_instance_type_string() }}):
+ {% set has_first_clause = true %}
73
{% elif not loop.last or ns.contains_properties_without_transform %}
74
{% if not has_first_clause %}if{% else %}elif{% endif %} isinstance({{ source }}, {{ inner_property.get_instance_type_string() }}):
75
{% set has_first_clause = true %}
0 commit comments