forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -224,7 +224,7 @@ def do_formsemestres_associate_new_version(
|
||||
_reassociate_moduleimpls(formsemestre, ues_old2new, modules_old2new)
|
||||
|
||||
db.session.commit()
|
||||
return formation_id
|
||||
return new_formation_id
|
||||
|
||||
|
||||
def _reassociate_moduleimpls(
|
||||
|
@ -149,10 +149,14 @@ def refcomp_assoc_formation(formation_id: int):
|
||||
db.session.get(ApcReferentielCompetences, referentiel_competence_id)
|
||||
is not None
|
||||
)
|
||||
formation.referentiel_competence_id = referentiel_competence_id
|
||||
db.session.add(formation)
|
||||
db.session.commit()
|
||||
flash("nouveau référentiel de compétences associé")
|
||||
if formation.referentiel_competence_id != referentiel_competence_id:
|
||||
formation.refcomp_desassoc()
|
||||
formation.referentiel_competence_id = referentiel_competence_id
|
||||
db.session.add(formation)
|
||||
db.session.commit()
|
||||
flash("Nouveau référentiel de compétences associé")
|
||||
else:
|
||||
flash("Pas de changements")
|
||||
return redirect(
|
||||
url_for(
|
||||
"notes.ue_table", scodoc_dept=g.scodoc_dept, formation_id=formation_id
|
||||
@ -172,7 +176,7 @@ def refcomp_assoc_formation(formation_id: int):
|
||||
@permission_required(Permission.ScoChangeFormation)
|
||||
def refcomp_desassoc_formation(formation_id: int):
|
||||
"""Désassocie la formation de son ref. de compétence"""
|
||||
formation = Formation.query.get_or_404(formation_id)
|
||||
formation: Formation = Formation.query.get_or_404(formation_id)
|
||||
formation.refcomp_desassoc()
|
||||
return redirect(
|
||||
url_for("notes.ue_table", scodoc_dept=g.scodoc_dept, formation_id=formation.id)
|
||||
|
Loading…
Reference in New Issue
Block a user