Commit be94ecdf authored by Christophe Benz's avatar Christophe Benz
Browse files

Don't check CSV delimiter if there is any source error

parent bcc9d9bc
......@@ -192,7 +192,10 @@ 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(err['code'] == 'source-error' for err in report['tables'][0]['errors']):
if report['tables'][0]['format'] == "csv" and not any(
err['type'] == 'source'
for err in report['tables'][0]['errors']
):
scdl_delimiter = ","
detected_delimiter = csv_helpers.detect_dialect(source, **options).delimiter
if detected_delimiter != scdl_delimiter:
......
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