Update Note form

This commit is contained in:
Gregory Trullemans 2023-11-14 14:19:15 +01:00
parent ae1a3e902b
commit e873ebeaa0
1 changed files with 4 additions and 1 deletions

View File

@ -482,7 +482,10 @@ def note_create_or_update(request, note_id=None, gymnast_id=None):
note = None
today = pendulum.now().date()
season, week_number = from_date_to_week_number(today)
data = {"coach": coach.id, "title": "Note of the week {week_number} ({season})"}
data = {
"coach": coach.id,
"title": f"Note of the week {week_number} ({season})",
}
if gymnast_id is not None:
gymnast = get_object_or_404(Gymnast, pk=gymnast_id)
data["gymnast"] = gymnast_id