forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -20,12 +20,7 @@ from app.api import api_bp as bp
|
||||
from app.api import api_web_bp
|
||||
from app.api import get_model_api_object, tools
|
||||
from app.decorators import permission_required, scodoc
|
||||
from app.models import (
|
||||
Identite,
|
||||
Justificatif,
|
||||
Departement,
|
||||
FormSemestre,
|
||||
)
|
||||
from app.models import Identite, Justificatif, Departement, FormSemestre, Scolog
|
||||
from app.models.assiduites import (
|
||||
compute_assiduites_justified,
|
||||
get_formsemestre_from_data,
|
||||
@ -503,6 +498,12 @@ def justif_edit(justif_id: int):
|
||||
db.session.add(justificatif_unique)
|
||||
db.session.commit()
|
||||
|
||||
Scolog.logdb(
|
||||
method="edit_justificatif",
|
||||
etudid=justificatif_unique.etudiant.id,
|
||||
msg=f"justificatif modif: {justificatif_unique}",
|
||||
)
|
||||
|
||||
# Génération du dictionnaire de retour
|
||||
# La couverture correspond
|
||||
# - aux assiduités précédemment justifiées par le justificatif
|
||||
|
@ -60,6 +60,7 @@ from app.models import (
|
||||
Justificatif,
|
||||
ModuleImpl,
|
||||
ScoDocSiteConfig,
|
||||
Scolog,
|
||||
)
|
||||
from app.scodoc.codes_cursus import UE_STANDARD
|
||||
from app.auth.models import User
|
||||
@ -779,8 +780,19 @@ def _record_justificatif_etud(
|
||||
form.entry_date.data = dt_entry_date_tz_server
|
||||
if justif.edit_from_form(form):
|
||||
message = "Justificatif modifié"
|
||||
|
||||
# On met à jour la db pour avoir les bonnes donnés pour le journal etud
|
||||
db.session.add(justif)
|
||||
db.session.commit()
|
||||
|
||||
Scolog.logdb(
|
||||
method="edit_justificatif",
|
||||
etudid=etud.id,
|
||||
msg=f"justificatif modif: {justif}",
|
||||
)
|
||||
else:
|
||||
message = "Pas de modification"
|
||||
|
||||
else:
|
||||
justif = Justificatif.create_justificatif(
|
||||
etud,
|
||||
|
Loading…
Reference in New Issue
Block a user