This commit is contained in:
Gregory Trullemans 2023-05-11 10:51:10 +02:00
parent e0b1a16d7d
commit 9be58441b6
1 changed files with 3 additions and 1 deletions

View File

@ -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,