Event deletion: Delete failed checkins

This commit is contained in:
Raphael Michel
2023-06-26 09:37:51 +02:00
parent b415393ccf
commit 3ad99d8239

View File

@@ -1277,6 +1277,9 @@ class Event(EventMixin, LoggedModel):
return not self.orders.exists() and not self.invoices.exists()
def delete_sub_objects(self):
from .checkin import Checkin
Checkin.all.filter(successful=False, list__event=self).delete()
self.cartposition_set.filter(addon_to__isnull=False).delete()
self.cartposition_set.all().delete()
self.vouchers.all().delete()