Commit ecef1881 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Fix KeyError

parent ccfc5d32
......@@ -210,7 +210,7 @@ class Validator:
options = {**options, "custom_loaders": loaders.custom_loaders}
report = inspector.inspect(source=source, schema=schema_descriptor, **options)
if report['tables'][0]['format'] == "csv" and not any(
if report['tables'][0].get('format') == "csv" and not any(
get_in(['errors', err['code'], 'type'], spec, default=None) == 'source'
for err in report['tables'][0]['errors']
):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment