Verified Commit 46f21665 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Also delete pizza event

parent e1c8a6db
......@@ -397,6 +397,8 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
if (self.start_reminder is not None
and not self.start_reminder.sent):
if self.is_pizza_event():
return super().delete(using, keep_parents)
def __str__(self):
......@@ -115,6 +115,12 @@ class PizzaEvent(models.Model):
super().save(*args, **kwargs)
def delete(self, using=None, keep_parents=False):
if (self.end_reminder is not None
and not self.end_reminder.sent):
return super().delete(using, keep_parents)
def __str__(self):
return 'Pizzas for ' + str(self.event)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment