mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Include Transaction in Event.delete_all_orders
This commit is contained in:
@@ -608,11 +608,14 @@ class Event(EventMixin, LoggedModel):
|
|||||||
return super().presale_has_ended
|
return super().presale_has_ended
|
||||||
|
|
||||||
def delete_all_orders(self, really=False):
|
def delete_all_orders(self, really=False):
|
||||||
from .orders import OrderFee, OrderPayment, OrderPosition, OrderRefund
|
from .orders import (
|
||||||
|
OrderFee, OrderPayment, OrderPosition, OrderRefund, Transaction,
|
||||||
|
)
|
||||||
|
|
||||||
if not really:
|
if not really:
|
||||||
raise TypeError("Pass really=True as a parameter.")
|
raise TypeError("Pass really=True as a parameter.")
|
||||||
|
|
||||||
|
Transaction.objects.filter(order__event=self).delete()
|
||||||
OrderPosition.all.filter(order__event=self, addon_to__isnull=False).delete()
|
OrderPosition.all.filter(order__event=self, addon_to__isnull=False).delete()
|
||||||
OrderPosition.all.filter(order__event=self).delete()
|
OrderPosition.all.filter(order__event=self).delete()
|
||||||
OrderFee.objects.filter(order__event=self).delete()
|
OrderFee.objects.filter(order__event=self).delete()
|
||||||
|
|||||||
Reference in New Issue
Block a user