reraise the exception

This commit is contained in:
Thomas Steen Rasmussen 2017-01-25 23:19:53 +01:00
parent 82d6b31766
commit daaa3128c8
2 changed files with 2 additions and 4 deletions

View file

@ -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,
)

View file

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