ciudadanointeligente / write-it

App to create and send messages to public persons. It's a component of POPLUS project.
poplus.org
GNU General Public License v3.0
38 stars 23 forks source link

incoming email handling should happen in a transaction.atomic() #1213

Open mhl opened 7 years ago

mhl commented 7 years ago

At the moment, if there's an error when handling an incoming email, objects may be created associated with that email (e.g. RawIncomingEmail objects) which then cause errors when reimporting the email.

I think the handling of incoming email should happen within a transaction that's rolled back in case of exceptions (e.g. by using a transaction.atomic() block)