Fix date notation with slashes in opendata imports
This commit is contained in:
parent
42b5021825
commit
434bf56e7b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user