Commit 6669014d authored by Phyks's avatar Phyks

Avoid errors on missing dates in Nancy OpenData file

parent 7da22205
Pipeline #138341 passed with stages
in 4 minutes and 30 seconds
......@@ -261,6 +261,9 @@ def preprocess_nancy(data):
# Homogeneize geo_shape
new_fields['geo_shape'] = geometry
# Homogeneize start and end date spelling
if not new_fields['DATE_DEBUT'] or not new_fields['DATE_FIN']:
# Invalid start / end date
continue
new_fields['date_debut'] = arrow.get(
float(new_fields['DATE_DEBUT']) / 1000
).isoformat()
......
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