forked from ScoDoc/ScoDoc
Fix: ListeAbsEtud arg
This commit is contained in:
parent
1c719b5c7c
commit
81720facff
@ -602,15 +602,15 @@ BOOL_STR = {
|
|||||||
"false": False,
|
"false": False,
|
||||||
"0": False,
|
"0": False,
|
||||||
"1": True,
|
"1": True,
|
||||||
"true": "true",
|
"true": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def bool_or_str(x):
|
def bool_or_str(x) -> bool:
|
||||||
"""a boolean, may also be encoded as a string "0", "False", "1", "True" """
|
"""a boolean, may also be encoded as a string "0", "False", "1", "True" """
|
||||||
if isinstance(x, str):
|
if isinstance(x, str):
|
||||||
return BOOL_STR[x.lower()]
|
return BOOL_STR[x.lower()]
|
||||||
return x
|
return bool(x)
|
||||||
|
|
||||||
|
|
||||||
# post filtering
|
# post filtering
|
||||||
|
@ -790,7 +790,8 @@ def ListeAbsEtud(
|
|||||||
absjust_only: si vrai, renvoie table absences justifiées
|
absjust_only: si vrai, renvoie table absences justifiées
|
||||||
sco_year: année scolaire à utiliser. Si non spécifier, utilie l'année en cours. e.g. "2005"
|
sco_year: année scolaire à utiliser. Si non spécifier, utilie l'année en cours. e.g. "2005"
|
||||||
"""
|
"""
|
||||||
absjust_only = int(absjust_only) # si vrai, table absjust seule (export xls ou pdf)
|
# si absjust_only, table absjust seule (export xls ou pdf)
|
||||||
|
absjust_only = ndb.bool_or_str(absjust_only)
|
||||||
datedebut = "%s-08-01" % scu.AnneeScolaire(sco_year=sco_year)
|
datedebut = "%s-08-01" % scu.AnneeScolaire(sco_year=sco_year)
|
||||||
|
|
||||||
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user