From 9fcef2dcaa5fb8d997a2b342c3963df4b275f259 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 31 Oct 2024 17:44:04 +0100 Subject: [PATCH] API: Fix deleting checkin-lists (Z#23170525) (PRETIXEU-AS5) (#4600) --- doc/api/resources/checkinlists.rst | 2 +- src/pretix/api/views/checkin.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/resources/checkinlists.rst b/doc/api/resources/checkinlists.rst index a6bd3327bf..29c33cd7df 100644 --- a/doc/api/resources/checkinlists.rst +++ b/doc/api/resources/checkinlists.rst @@ -342,7 +342,7 @@ Endpoints .. http:delete:: /api/v1/organizers/(organizer)/events/(event)/checkinlist/(id)/ - Delete a check-in list. Note that this also deletes the information on all check-ins performed via this list. + Delete a check-in list. **Note that this also deletes the information on all check-ins performed via this list.** **Example request**: diff --git a/src/pretix/api/views/checkin.py b/src/pretix/api/views/checkin.py index 3c18e18cc9..eed32e5531 100644 --- a/src/pretix/api/views/checkin.py +++ b/src/pretix/api/views/checkin.py @@ -143,7 +143,9 @@ class CheckinListViewSet(viewsets.ModelViewSet): data=self.request.data ) + @transaction.atomic def perform_destroy(self, instance): + instance.checkins.all().delete() instance.log_action( 'pretix.event.checkinlist.deleted', user=self.request.user,