Skip to content

Commit

Permalink
Merge pull request #27 from guokr/26-bugfix-normalize_default
Browse files Browse the repository at this point in the history
fixes #26
  • Loading branch information
rejown committed Aug 5, 2015
2 parents 5728822 + b3da55e commit 9c1051f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion swagger_py_codegen/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ def _normalize_list(schema, data):
return result

def _normalize_default(schema, data):
return data or schema.get('default')
if data is None:
return schema.get('default')
else:
return data

def _normalize(schema, data):
if not schema:
Expand Down

0 comments on commit 9c1051f

Please sign in to comment.