forked from CGM_Public/pretix_original
Refs #678 -- Allow deletion of events that do not have any orders
This commit is contained in:
@@ -544,6 +544,9 @@ class Event(EventMixin, LoggedModel):
|
||||
Q(is_superuser=True) | Q(twp=True)
|
||||
)
|
||||
|
||||
def allow_delete(self):
|
||||
return not self.orders.exists() and not self.invoices.exists()
|
||||
|
||||
|
||||
class SubEvent(EventMixin, LoggedModel):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user