Commit 6097f772 authored by Christophe Benz's avatar Christophe Benz

Use raw data from goodtables errors

parent db77fdb3
......@@ -58,8 +58,7 @@ def duplicate_row(err, headers, schema):
def enumerable_constraint(err, headers, schema):
""" enumerable-constraint """
constraint_values = eval(err['message-data']['constraint'])
ok_values = ['"{}"'.format(val) for val in constraint_values]
ok_values = ['"{}"'.format(val) for val in err['message-data']['constraint']]
if len(ok_values) == 1:
return u_err(err, 'Valeur incorrecte', 'L\'unique valeur autorisée pour cette colonne est: {}'.format(ok_values[0]))
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