Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
project info.
- `none` will not create a project folder at all, only the inner package folder (which won't be inner anymore)
- Attempt to detect and alert users if they are using an unsupported version of OpenAPI (#281).
- Fixes `Enum` deserialization when the value is `UNSET`.

### Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def _parse_a_property(data: Any) -> Union[Unset, AnEnum, AnIntEnum]:
try:
a_property = UNSET
_a_property = data
if _a_property is not None:
if _a_property is not None and _a_property is not UNSET:
a_property = AnEnum(_a_property)

return a_property
except: # noqa: E722
pass
a_property = UNSET
_a_property = data
if _a_property is not None:
if _a_property is not None and _a_property is not UNSET:
a_property = AnIntEnum(_a_property)

return a_property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def _parse_a_property(data: Any) -> Union[Unset, AnEnum, AnIntEnum]:
try:
a_property = UNSET
_a_property = data
if _a_property is not None:
if _a_property is not None and _a_property is not UNSET:
a_property = AnEnum(_a_property)

return a_property
except: # noqa: E722
pass
a_property = UNSET
_a_property = data
if _a_property is not None:
if _a_property is not None and _a_property is not UNSET:
a_property = AnIntEnum(_a_property)

return a_property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% else %}
{{ property.python_name }} = {{ initial_value }}
_{{ property.python_name }} = {{ source }}
if _{{ property.python_name }} is not None:
if _{{ property.python_name }} is not None and _{{ property.python_name }} is not UNSET:
{{ property.python_name }} = {{ property.reference.class_name }}(_{{ property.python_name }})
{% endif %}
{% endmacro %}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.