Refs #678 -- Allow deletion of events that do not have any orders

This commit is contained in:
Raphael Michel
2018-01-29 12:06:49 +01:00
parent 14da25bd9e
commit 0b12b7aa89
11 changed files with 232 additions and 6 deletions

View File

@@ -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):
"""