forked from ScoDoc/ScoDoc
Fix: update_inscriptions_parcours_from_groups (restreint au ref. comp. courant)
This commit is contained in:
parent
f979eb137c
commit
cf876ca0d3
@ -782,6 +782,8 @@ class FormSemestre(db.Model):
|
||||
Les groupes de parcours sont ceux de la partition scu.PARTITION_PARCOURS
|
||||
et leur nom est le code du parcours (eg "Cyber").
|
||||
"""
|
||||
if self.formation.referentiel_competence_id is None:
|
||||
return # safety net
|
||||
partition = Partition.query.filter_by(
|
||||
formsemestre_id=self.id, partition_name=scu.PARTITION_PARCOURS
|
||||
).first()
|
||||
@ -805,7 +807,10 @@ class FormSemestre(db.Model):
|
||||
query = (
|
||||
ApcParcours.query.filter_by(code=group.group_name)
|
||||
.join(ApcReferentielCompetences)
|
||||
.filter_by(dept_id=g.scodoc_dept_id)
|
||||
.filter_by(
|
||||
dept_id=g.scodoc_dept_id,
|
||||
id=self.formation.referentiel_competence_id,
|
||||
)
|
||||
)
|
||||
if query.count() != 1:
|
||||
log(
|
||||
|
Loading…
Reference in New Issue
Block a user