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

Remove notifications on event delete

parent dc617862
......@@ -390,6 +390,15 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
super().save()
def delete(self, using=None, keep_parents=False):
if (self.registration_reminder is not None
and not self.registration_reminder.sent):
self.registration_reminder.delete()
if (self.start_reminder is not None
and not self.start_reminder.sent):
self.start_reminder.delete()
return super().delete(using, keep_parents)
def __str__(self):
return '{}: {}'.format(
self.title,
......
Markdown is supported
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