From 9be58441b6b46204ba8d289ebea59893f711a547 Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Thu, 11 May 2023 10:51:10 +0200 Subject: [PATCH] Bug fix --- jarvis/followup/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jarvis/followup/views.py b/jarvis/followup/views.py index 67cbdfe..482f535 100644 --- a/jarvis/followup/views.py +++ b/jarvis/followup/views.py @@ -897,6 +897,8 @@ def mindstate_create_or_update( # notification receiver = [] gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id) + date = form.cleaned_data["date"] + score = form.cleaned_data["score"] functionality = ContentType.objects.get(model="mindstate") for notification in gymnast.notifications.filter( functionality=functionality @@ -905,7 +907,7 @@ def mindstate_create_or_update( send_mail( f"{gymnast} : Nouvel état d'esprit", - f"{gymnast} a indiqué son état d'esprit ({form.cleaned_data["date"]}) : {form.cleaned_data["score"]}/10", + f"{gymnast} a ajouté état son esprit enregistré ({date}) : {score}/10", settings.EMAIL_HOST_USER, receiver, fail_silently=False,