Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 11 additions and 4 deletions
Showing only changes of commit 975b4247e0 - Show all commits

View File

@ -471,9 +471,16 @@ class ApcNiveau(db.Model, XMLModel):
for pn in parcour_niveaux for pn in parcour_niveaux
] ]
else: else:
niveaux: list[ApcNiveau] = competence.niveaux.filter_by( niveaux: list[ApcNiveau] = (
annee=f"BUT{int(annee)}" ApcNiveau.query.filter_by(annee=f"BUT{int(annee)}")
).all() .join(ApcCompetence)
.filter_by(id=competence.id)
.join(ApcParcoursNiveauCompetence)
.filter(ApcParcoursNiveauCompetence.niveau == ApcNiveau.ordre)
.join(ApcAnneeParcours)
.filter_by(parcours_id=parcour.id)
.all()
)
_cache[key] = niveaux _cache[key] = niveaux
return niveaux return niveaux

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.6.6" SCOVERSION = "9.6.7"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"