Closed cbenz closed 5 years ago
@cbenz
Thanks. TBH I'm trying to understand now what these lines do at all for the required-constraint
(commented):
# Check constraint
valid = field.test_value(value, constraints=['required'])
# if field.descriptor.get('primaryKey'):
# valid = valid and field.cast_value(value) is not None
I'll try to get rid of them completely if it's possible because as I understand it now the valid = field.test_value(value, constraints=['required'])
line already checks for None values
@cbenz
Please try goodtables@2.2.1
Original bug report: https://git.opendatafrance.net/validata/validata-core/issues/7
Trying to validate this file against this schema I get a stack trace ending on a
CastError
:I think that this error should be caught, like it is in type_or_format_error.py.