Skip to content

Commit

Permalink
schema-validator to treat missing fields as None
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Oct 18, 2018
1 parent 4ef7131 commit d598c30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataflows/base/schema_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def schema_validator(resource: Resource, iterator, field_names=None):

try:
for f in schema_fields:
row[f.name] = f.cast_value(row[f.name])
row[f.name] = f.cast_value(row.get(f.name))
except CastError as e:
raise ValidationError(resource.name, row, i, e)

Expand Down

0 comments on commit d598c30

Please sign in to comment.