Commit c1161609 authored by Christophe Benz's avatar Christophe Benz

Merge branch 'cbenz-master-patch-18260' into 'master'

Do not validate empty values

See merge request !8
parents 019680c5 4c928d8b
Pipeline #1793 failed with stage
in 3 minutes and 4 seconds
......@@ -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