Skip to content

Commit a304b28

Browse files
fix: [Python] Nullable bugfix in model.mustache
1 parent 0c712a5 commit a304b28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/swagger-codegen/src/main/resources/python/model.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ class {{classname}}(object):
9999
:type: {{datatype}}
100100
"""
101101
{{#required}}
102+
{{^nullable}}
102103
if self._configuration.client_side_validation and {{name}} is None:
103104
raise ValueError("Invalid value for `{{name}}`, must not be `None`") # noqa: E501
105+
{{/nullable}}
104106
{{/required}}
105107
{{#isEnum}}
106108
{{#isContainer}}

0 commit comments

Comments
 (0)