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 4 additions and 4 deletions
Showing only changes of commit 988f577f6e - Show all commits

View File

@ -322,13 +322,13 @@ def formation_import_xml(doc: str, import_tags=True, use_local_refcomp=False):
referentiel_competence_id = _formation_retreive_refcomp(f_dict) referentiel_competence_id = _formation_retreive_refcomp(f_dict)
f_dict["referentiel_competence_id"] = referentiel_competence_id f_dict["referentiel_competence_id"] = referentiel_competence_id
# find new version number # find new version number
acronyme_lower = f_dict["acronyme"].lower if f_dict["acronyme"] else "" acronyme_lower = f_dict["acronyme"].lower() if f_dict["acronyme"] else ""
titre_lower = f_dict["titre"].lower if f_dict["titre"] else "" titre_lower = f_dict["titre"].lower() if f_dict["titre"] else ""
formations: list[Formation] = Formation.query.filter_by( formations: list[Formation] = Formation.query.filter_by(
dept_id=f_dict["dept_id"] dept_id=f_dict["dept_id"]
).filter( ).filter(
db.func.lower(Formation.acronyme) == acronyme_lower, db.func.lower(Formation.acronyme) == acronyme_lower,
db.func(Formation.titre) == titre_lower, db.func.lower(Formation.titre) == titre_lower,
) )
if formations.count(): if formations.count():
version = max(f.version or 0 for f in formations) version = max(f.version or 0 for f in formations)

View File

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