Commit 1cd04d93 authored by Pierre Dittgen's avatar Pierre Dittgen

Wrong column delimiter becomes Invalid column delimiter

parent 42c66041
......@@ -70,7 +70,7 @@ ERR_CODE_TO_CONTEXT = dict([
('minimum-constraint', 'body'),
# TODO: get it from validata_validate
('wrong-column-delimiter', 'table')
('invalid-column-delimiter', 'table')
# Custom checks fall in default case: body
])
......@@ -121,6 +121,11 @@ def create_validata_report(goodtables_report):
rows = []
current_row_id = 0
for err in report['table']['errors']['body']:
if not 'column-number' in err:
# TODO: handle blank row
print("No column-number problem", err)
continue
row_id = err['row-number']
del err['row-number']
del err['context']
......@@ -142,7 +147,7 @@ def validate(schema_code, source, source_type):
validata_report = create_validata_report(goodtables_report)
# return jsonify(better_report)
# return jsonify(validata_report)
source_data = extract_source_data(source)
......
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