Skip to content

Commit

Permalink
[CLI] [CHECK] Edit error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
wblondel committed Jan 15, 2021
1 parent 8c4b8d1 commit fd473cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions insee-deaths-manager/cli_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ def check_fields(csv_dir, full_name, gender, date, postcode, city):

if city:
if not tests.city_empty_when_postcode_990(row):
errors.append("Valeur du champ commune inutile.")
errors.append("Valeur du champ commune de naissance inutile. "
"Le code lieu indique déjà que la commune est inconnue.")

if tests.city_not_known(row):
errors.append("Valeur du champ commune inutile.")

#if not tests.city_correctly_formated_when_arrondissement(row):
# errors.append("Format requis: VILLE (X)X")
if not tests.city_correctly_formated_when_arrondissement(row):
errors.append("Format requis: VILLE (X)X")

if errors:
print(f"{deathreader.line_num} {row} {errors}")
Expand Down

0 comments on commit fd473cc

Please sign in to comment.