From 7c9cb1f550459bb4987fd2c18590f27f2113ff98 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 15 Mar 2025 23:40:02 +0100 Subject: [PATCH] Fix bug imports vides --- src/agenda_culturel/models.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index fb2bbe5..f638fc0 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -2768,7 +2768,14 @@ class RecurrentImport(models.Model): stdev=StdDev("foresight"), ) - return [[_(x), round(stats[x], 2), round(statsm[x], 2)] for x in stats] + return [ + [ + _(x), + round(stats[x], 2) if stats[x] is not None else "-", + round(statsm[x], 2) if statsm[x] is not None else "-", + ] + for x in stats + ] def get_global_foresight_quality(): return RecurrentImport._get_foresight_quality_internal(Event.objects)