Commit 434bf56e authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney)
Browse files

Fix date notation with slashes in opendata imports

parent 42b50218
Pipeline #200981 passed with stages
in 5 minutes and 3 seconds
......@@ -623,12 +623,12 @@ def process_opendata(name, data, report_type=REPORT_TYPE):
# Check that the work is currently being done
now = arrow.now('Europe/Paris')
if fields['date_debut']:
start_date = arrow.get(fields['date_debut'])
start_date = arrow.get(fields['date_debut'].replace('/', '-'))
else:
# Defaults to now if start date is unknown
start_date = arrow.get(now)
if fields['date_fin']:
end_date = arrow.get(fields['date_fin'])
end_date = arrow.get(fields['date_fin'].replace('/', '-'))
else:
# Defaults to in a week if start date is unknown
end_date = arrow.get(now).shift(days=+7)
......
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