Browse Source

Fix date notation with slashes in opendata imports

Phyks (Lucas Verney) 1 month ago
parent
commit
434bf56e7b
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      scripts/opendata/works.py

+ 2
- 2
scripts/opendata/works.py View File

@@ -623,12 +623,12 @@ def process_opendata(name, data, report_type=REPORT_TYPE):
623 623
             # Check that the work is currently being done
624 624
             now = arrow.now('Europe/Paris')
625 625
             if fields['date_debut']:
626
-                start_date = arrow.get(fields['date_debut'])
626
+                start_date = arrow.get(fields['date_debut'].replace('/', '-'))
627 627
             else:
628 628
                 # Defaults to now if start date is unknown
629 629
                 start_date = arrow.get(now)
630 630
             if fields['date_fin']:
631
-                end_date = arrow.get(fields['date_fin'])
631
+                end_date = arrow.get(fields['date_fin'].replace('/', '-'))
632 632
             else:
633 633
                 # Defaults to in a week if start date is unknown
634 634
                 end_date = arrow.get(now).shift(days=+7)