1
0
forked from ScoDoc/ScoDoc

Fix some logs

This commit is contained in:
Emmanuel Viennet 2024-07-09 09:09:25 +02:00
parent 84cf99cda4
commit 9deae8cd6a
2 changed files with 2 additions and 3 deletions

View File

@ -558,13 +558,13 @@ class Justificatif(ScoDocModel):
Raises ScoValueError si paramètres incorrects.
"""
nouv_justificatif = cls.create_from_dict(locals())
db.session.commit()
log(f"create_justificatif: etudid={etudiant.id} {nouv_justificatif}")
Scolog.logdb(
method="create_justificatif",
etudid=etudiant.id,
msg=f"justificatif: {nouv_justificatif}",
)
db.session.commit()
return nouv_justificatif
def supprime(self):

View File

@ -336,13 +336,12 @@ class GroupDescr(ScoDocModel):
"Enlève l'étudiant de ce groupe s'il en fait partie (ne fait rien sinon)"
if etud in self.etuds:
self.etuds.remove(etud)
db.session.commit()
Scolog.logdb(
method="group_remove_etud",
etudid=etud.id,
msg=f"Retrait du groupe {self.group_name} de {self.partition.partition_name}",
commit=True,
)
db.session.commit()
# Update parcours
if self.partition.partition_name == scu.PARTITION_PARCOURS:
self.partition.formsemestre.update_inscriptions_parcours_from_groups(