From 64b6e581829a50c31f9e29dce1db5d9813428ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Fri, 8 Jan 2021 12:35:40 +0100 Subject: [PATCH] fix: :bug: Fix send_mail_voucher function --- cotisations/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cotisations/utils.py b/cotisations/utils.py index 8166b0be..f484546a 100644 --- a/cotisations/utils.py +++ b/cotisations/utils.py @@ -105,8 +105,8 @@ def send_mail_voucher(invoice, request=None): "lastname": invoice.user.surname, "email": invoice.user.email, "phone": invoice.user.telephone, - "date_end": invoice.get_subscription().latest("date_end").date_end_memb, - "date_begin": invoice.get_subscription().earliest("date_start").date_start_memb, + "date_end": invoice.get_subscription().latest("date_end_memb").date_end_memb, + "date_begin": invoice.get_subscription().earliest("date_start_memb").date_start_memb, } templatename = CotisationsOption.get_cached_value( "voucher_template"