Fix bug imports vides

This commit is contained in:
Jean-Marie Favreau 2025-03-15 23:40:02 +01:00
parent fa4024a912
commit 7c9cb1f550

View File

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