From b6a3bd23884c60799f9d6a792881fa8a13eb79d6 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 3 Jan 2022 12:31:20 +0100 Subject: [PATCH] cosmetic --- app/comp/res_sem.py | 6 +++--- scodoc.py | 3 ++- tools/debian/postinst | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/comp/res_sem.py b/app/comp/res_sem.py index 4f3a5dda..5eccd325 100644 --- a/app/comp/res_sem.py +++ b/app/comp/res_sem.py @@ -230,7 +230,7 @@ class NotesTableCompat(ResultatsSemestre): def get_etud_ue_status(self, etudid: int, ue_id: int): return { - "cur_moy_ue": self.results.etud_moy_ue[ue_id][etudid], + "cur_moy_ue": self.etud_moy_ue[ue_id][etudid], "is_capitalized": False, # XXX TODO } @@ -242,9 +242,9 @@ class NotesTableCompat(ResultatsSemestre): def get_evals_in_mod(self, moduleimpl_id: int) -> list[dict]: "liste des évaluations valides dans un module" - mi = ModuleImpl.query.get(moduleimpl_id) + modimpl = ModuleImpl.query.get(moduleimpl_id) evals_results = [] - for e in mi.evaluations: + for e in modimpl.evaluations: d = e.to_dict() d["heure_debut"] = e.heure_debut # datetime.time d["heure_fin"] = e.heure_fin diff --git a/scodoc.py b/scodoc.py index 1be50552..28e2f59b 100755 --- a/scodoc.py +++ b/scodoc.py @@ -29,7 +29,6 @@ from app.models import ModuleImpl, ModuleImplInscription from app.models import Identite from app.models import departements from app.models.evaluations import Evaluation -from app.scodoc.sco_etud import identite_create from app.scodoc.sco_permissions import Permission from app.views import notes, scolar import tools @@ -248,6 +247,7 @@ def edit_role(rolename, addpermissionname=None, removepermissionname=None): # e db.session.add(role) db.session.commit() + @app.cli.command() @click.argument("rolename") def delete_role(rolename): @@ -259,6 +259,7 @@ def delete_role(rolename): db.session.delete(role) db.session.commit() + @app.cli.command() @click.argument("username") @click.option("-d", "--dept", "dept_acronym") diff --git a/tools/debian/postinst b/tools/debian/postinst index 84001fc9..1f3683ea 100755 --- a/tools/debian/postinst +++ b/tools/debian/postinst @@ -64,7 +64,7 @@ fi # ------------ LIEN VERS .env # Pour conserver le .env entre les mises à jour, on le génère dans -# /opt/scodoc-data/;env et on le lie: +# /opt/scodoc-data/.env et on le lie: if [ ! -e "$SCODOC_DIR/.env" ] && [ ! -L "$SCODOC_DIR/.env" ] then ln -s "$SCODOC_VAR_DIR/.env" "$SCODOC_DIR"