From daaa3128c80fcc6b4aff003d511146e3b30de15d Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Wed, 25 Jan 2017 23:19:53 +0100 Subject: [PATCH] reraise the exception --- program/models.py | 2 -- utils/models.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/program/models.py b/program/models.py index a88521f0..2cb877e0 100644 --- a/program/models.py +++ b/program/models.py @@ -99,8 +99,6 @@ class Speaker(CreatedUpdatedModel): camp = models.ForeignKey('camps.Camp', null=True, related_name="speakers") events = models.ManyToManyField( Event, - related_name='speakers', - related_query_name='speaker', blank=True, ) diff --git a/utils/models.py b/utils/models.py index 54da5790..a292aa54 100644 --- a/utils/models.py +++ b/utils/models.py @@ -17,8 +17,8 @@ class CleanedModel(models.Model): if hasattr(self, 'request'): messages.error(self.request, message) print(message) - # dont save, just return - return + # dont save, re-raise the exception + raise super(CleanedModel, self).save(**kwargs)