api: don't build details if not requested (#77590)
This commit is contained in:
parent
2d2052f91c
commit
11559acd35
|
@ -1867,14 +1867,15 @@ class RecurringFillslots(APIView):
|
|||
Booking.objects.filter(primary_booking__in=bookings_to_cancel).update(
|
||||
cancellation_datetime=cancellation_datetime
|
||||
)
|
||||
cancelled_events = [
|
||||
get_short_event_detail(
|
||||
request,
|
||||
events_by_id[x.event_id],
|
||||
multiple_agendas=True,
|
||||
)
|
||||
for x in bookings_to_cancel
|
||||
]
|
||||
if payload.get('include_booked_events_detail'):
|
||||
cancelled_events = [
|
||||
get_short_event_detail(
|
||||
request,
|
||||
events_by_id[x.event_id],
|
||||
multiple_agendas=True,
|
||||
)
|
||||
for x in bookings_to_cancel
|
||||
]
|
||||
cancelled_count = bookings_to_cancel.update(cancellation_datetime=cancellation_datetime)
|
||||
# and delete outdated cancelled bookings
|
||||
Booking.objects.filter(
|
||||
|
|
Loading…
Reference in New Issue