From e5fb9f4365617d207bd20cbc3068f098fdf777c2 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 19 Jan 2022 23:56:32 +0100 Subject: [PATCH] Fix: ancien mode de calcul nt / cmp py3 --- app/scodoc/notes_table.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/scodoc/notes_table.py b/app/scodoc/notes_table.py index 996feddab..2209aea7d 100644 --- a/app/scodoc/notes_table.py +++ b/app/scodoc/notes_table.py @@ -814,7 +814,12 @@ class NotesTable: moy_ue_cap = ue_cap["moy"] mu["was_capitalized"] = True event_date = event_date or ue_cap["event_date"] - if (moy_ue_cap != "NA") and (moy_ue_cap > max_moy_ue): + if ( + (moy_ue_cap != "NA") + and isinstance(moy_ue_cap, float) + and isinstance(max_moy_ue, float) + and (moy_ue_cap > max_moy_ue) + ): # meilleure UE capitalisée event_date = ue_cap["event_date"] max_moy_ue = moy_ue_cap