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

Fix duplicate-row message when multiple duplicated rows

parent 204682d2
......@@ -74,11 +74,11 @@ def duplicate_header(err, schema):
def duplicate_row(err, schema):
"""duplicate-row error"""
msg_prefix = 'La ligne est identique '
row_numbers = err['message-data']['row_numbers']
if not ',' in row_numbers:
msg = msg_prefix + "à la ligne {}.".format(row_numbers)
row_number_str = err['message-data']['row_numbers']
if not ',' in row_number_str:
msg = msg_prefix + "à la ligne {}.".format(row_number_str)
msg = msg_prefix + "aux lignes {}.".format(et_join(row_numbers))
msg = msg_prefix + "aux lignes {}.".format(et_join(row_number_str.split(', ')))
msg += "\n\nVous pouvez la supprimer."
return u_err(err, 'Ligne dupliquée', msg)
Supports Markdown
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