From 0e4fb95a39084573a1fd6a62ecc83498142ef0c9 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 4 Aug 2015 16:14:29 +0200 Subject: [PATCH] Turn on exception for incoming messages > Errors should never pass silently I waste a hours to debug that . I don't expect this kind of behaviour. In my app proccess incoming mails is critical and I should receive exception and on fail transaction should rollback everything and try again later. --- django_mailbox/models.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 4324cd8..eb096c8 100644 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -260,11 +260,8 @@ class Mailbox(models.Model): msg.outgoing = False msg.save() - try: - message_received.send(sender=self, message=msg) - except: - pass - + message_received.send(sender=self, message=msg) + return msg def record_outgoing_message(self, message):