Ignore coefficients of UE SPORTS when using UE coefs.

This commit is contained in:
Emmanuel Viennet 2021-01-23 21:40:57 +01:00
parent 396880d058
commit d6b6796ae5

View File

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