reraise the exception
This commit is contained in:
parent
82d6b31766
commit
daaa3128c8
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue