1
0
forked from ScoDoc/ScoDoc

Fix #394 (export Apo NaN)

This commit is contained in:
Emmanuel Viennet 2022-08-25 18:43:24 +02:00
parent 36f78d36cb
commit 1e7cc06399

View File

@ -92,6 +92,7 @@ import time
from zipfile import ZipFile
from flask import send_file
import numpy as np
# Pour la détection auto de l'encodage des fichiers Apogée:
from chardet import detect as chardet_detect
@ -134,6 +135,8 @@ def _apo_fmt_note(note, fmt="%3.2f"):
val = float(note)
except ValueError:
return ""
if np.isnan(val):
return ""
return (fmt % val).replace(".", APO_DECIMAL_SEP)