Commit 4c928d8b authored by Christophe Benz's avatar Christophe Benz

Do not validate empty values

parent 019680c5
Pipeline #1765 failed with stage
in 3 minutes and 1 second
......@@ -30,7 +30,10 @@ class FrenchSirenValue(object):
return
# Check value
value = cell.get("value")
value = cell.get('value')
if not value:
return
if not stdnum.fr.siren.is_valid(value):
message = 'La valeur "{value}" n\'est pas un numéro SIREN français valide.'
message_substitutions = {"value": value}
......
......@@ -37,6 +37,9 @@ class FrenchSiretValue(object):
# Check value
value = cell.get('value')
if not value:
return
if not stdnum.fr.siret.is_valid(value):
message = "La valeur \"{value}\" n'est pas un numéro SIRET français valide."
message_substitutions = {
......
......@@ -56,9 +56,7 @@ class YearIntervalValue(object):
# Check value
value = cell.get('value')
# Don't warn on empty values
if value == '':
if not value:
return
# Checks for interval format
......
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