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") camp = models.ForeignKey('camps.Camp', null=True, related_name="speakers")
events = models.ManyToManyField( events = models.ManyToManyField(
Event, Event,
related_name='speakers',
related_query_name='speaker',
blank=True, blank=True,
) )

View file

@ -17,8 +17,8 @@ class CleanedModel(models.Model):
if hasattr(self, 'request'): if hasattr(self, 'request'):
messages.error(self.request, message) messages.error(self.request, message)
print(message) print(message)
# dont save, just return # dont save, re-raise the exception
return raise
super(CleanedModel, self).save(**kwargs) super(CleanedModel, self).save(**kwargs)