Bug fix
This commit is contained in:
parent
e0b1a16d7d
commit
9be58441b6
|
@ -897,6 +897,8 @@ def mindstate_create_or_update(
|
||||||
# notification
|
# notification
|
||||||
receiver = []
|
receiver = []
|
||||||
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
|
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")
|
functionality = ContentType.objects.get(model="mindstate")
|
||||||
for notification in gymnast.notifications.filter(
|
for notification in gymnast.notifications.filter(
|
||||||
functionality=functionality
|
functionality=functionality
|
||||||
|
@ -905,7 +907,7 @@ def mindstate_create_or_update(
|
||||||
|
|
||||||
send_mail(
|
send_mail(
|
||||||
f"{gymnast} : Nouvel état d'esprit",
|
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,
|
settings.EMAIL_HOST_USER,
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
|
|
Loading…
Reference in New Issue