Skip to content

Commit

Permalink
revert: skips populating default if property not in instance"
Browse files Browse the repository at this point in the history
Refs: ba7eccf
  • Loading branch information
pallabpain committed Jan 25, 2024
1 parent c066477 commit d482223
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions riocli/jsonschema/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ def set_defaults(validator, properties, instance, schema):
for p, sub_schema in properties.items():
if "default" not in sub_schema:
continue

# Skip if property is not in instance
if p not in instance:
continue

if isinstance(instance, dict):
instance.setdefault(p, sub_schema["default"])
if isinstance(instance, list):
Expand Down

0 comments on commit d482223

Please sign in to comment.