mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
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