From d6b6796ae5d6cd8da525053acadd485f16daefdc Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 23 Jan 2021 21:40:57 +0100 Subject: [PATCH] Ignore coefficients of UE SPORTS when using UE coefs. --- notes_table.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notes_table.py b/notes_table.py index bdb303004..004c60d95 100644 --- a/notes_table.py +++ b/notes_table.py @@ -896,8 +896,10 @@ class NotesTable: sum_coefs_ue = 0 for mu in moy_ues.values(): # mu["moy"] can be a number, or "NA", or "ERR" (user-defined UE formulas) - if isnumber(mu["moy"]) and ( - mu["est_inscrit"] or mu["is_capitalized"] + if ( + (mu["ue"]["type"] != UE_SPORT) + and isnumber(mu["moy"]) + and (mu["est_inscrit"] or mu["is_capitalized"]) ): coef_ue = mu["ue"]["coefficient"] sum_moy_ue += mu["moy"] * coef_ue