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")
|
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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue