1
0
forked from ScoDoc/ScoDoc

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 sum_coefs_ue = 0
for mu in moy_ues.values(): for mu in moy_ues.values():
# mu["moy"] can be a number, or "NA", or "ERR" (user-defined UE formulas) # mu["moy"] can be a number, or "NA", or "ERR" (user-defined UE formulas)
if isnumber(mu["moy"]) and ( if (
mu["est_inscrit"] or mu["is_capitalized"] (mu["ue"]["type"] != UE_SPORT)
and isnumber(mu["moy"])
and (mu["est_inscrit"] or mu["is_capitalized"])
): ):
coef_ue = mu["ue"]["coefficient"] coef_ue = mu["ue"]["coefficient"]
sum_moy_ue += mu["moy"] * coef_ue sum_moy_ue += mu["moy"] * coef_ue