From 0d5a62ae7f140f5d5e82adc459a3c6acacb81033 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 10 Feb 2024 20:42:55 +0100 Subject: [PATCH] Fix calendars import --- sncfgtfs/management/commands/update_sncf_gtfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sncfgtfs/management/commands/update_sncf_gtfs.py b/sncfgtfs/management/commands/update_sncf_gtfs.py index ddb7372..dee97d7 100644 --- a/sncfgtfs/management/commands/update_sncf_gtfs.py +++ b/sncfgtfs/management/commands/update_sncf_gtfs.py @@ -180,7 +180,7 @@ class Command(BaseCommand): calendars[calendar.id] = calendar if len(calendars) >= bulk_size and not dry_run: - Calendar.objects.bulk_create(calendars, + Calendar.objects.bulk_create(calendars.values(), update_conflicts=True, update_fields=['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'start_date',