Better calendar import
This commit is contained in:
parent
fd4157acbd
commit
22de576f53
|
@ -177,8 +177,7 @@ class Command(BaseCommand):
|
||||||
end_date=calendar_dict['end_date'],
|
end_date=calendar_dict['end_date'],
|
||||||
transport_type=transport_type,
|
transport_type=transport_type,
|
||||||
)
|
)
|
||||||
calendars.append(calendar)
|
calendars[calendar.id] = calendar
|
||||||
calendar_ids.append(calendar.id)
|
|
||||||
|
|
||||||
if len(calendars) >= bulk_size and not dry_run:
|
if len(calendars) >= bulk_size and not dry_run:
|
||||||
Calendar.objects.bulk_create(calendars,
|
Calendar.objects.bulk_create(calendars,
|
||||||
|
|
Loading…
Reference in New Issue