forked from ScoDoc/ScoDoc
Fix #394 (export Apo NaN)
This commit is contained in:
parent
36f78d36cb
commit
1e7cc06399
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user