Skip to content

Commit

Permalink
Merge pull request #69 from guokr/67-fix-repeat-getattr
Browse files Browse the repository at this point in the history
fix repeat getattr
  • Loading branch information
softlns committed Jul 5, 2016
2 parents 75a9cae + ac12b7b commit 44d2555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion swagger_py_codegen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .command import generate

__version__ = '0.1.16'
__version__ = '0.1.17'
5 changes: 3 additions & 2 deletions swagger_py_codegen/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ def _normalize_dict(schema, data):
_schema['default'] = required_defaults[type_]

# get value
if data.has(key):
result[key] = _normalize(_schema, data.get(key))
value = data.get(key)
if value is not None:
result[key] = _normalize(_schema, value)
elif 'default' in _schema:
result[key] = _schema['default']
elif key in schema.get('required', []):
Expand Down

0 comments on commit 44d2555

Please sign in to comment.