From 2d22c202e9af4c53b2d2de18ae6736621c2bde64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Wed, 29 Mar 2017 18:17:20 +0100 Subject: [PATCH] Prevent side effects while sending emails --- bda/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bda/models.py b/bda/models.py index a405a665..df73a209 100644 --- a/bda/models.py +++ b/bda/models.py @@ -315,10 +315,11 @@ class SpectacleRevente(models.Model): # Envoie un mail aux perdants for inscrit in inscrits: if inscrit != winner: - context['acheteur'] = inscrit.user + new_context = dict(context) + new_context['acheteur'] = inscrit.user datatuple.append(( 'bda-revente-loser', - context, + new_context, settings.MAIL_DATA['revente']['FROM'], [inscrit.user.email] ))