From 47d728376cad018dfbc714fc7a07faa2723b496b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 12 Nov 2021 11:31:50 +0100 Subject: [PATCH] code cosmetic --- app/scodoc/sco_groups.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app/scodoc/sco_groups.py b/app/scodoc/sco_groups.py index 136529865..4d84f2a2b 100644 --- a/app/scodoc/sco_groups.py +++ b/app/scodoc/sco_groups.py @@ -377,11 +377,18 @@ def formsemestre_get_etud_groupnames(formsemestre_id, attr="group_name"): { etudid : { partition_id : group_name }} (attr=group_name or group_id) """ infos = ndb.SimpleDictFetch( - """SELECT i.etudid AS etudid, p.id AS partition_id, - gd.group_name, gd.id AS group_id - FROM notes_formsemestre_inscription i, partition p, - group_descr gd, group_membership gm - WHERE i.formsemestre_id=%(formsemestre_id)s + """SELECT + i.etudid AS etudid, + p.id AS partition_id, + gd.group_name, + gd.id AS group_id + FROM + notes_formsemestre_inscription i, + partition p, + group_descr gd, + group_membership gm + WHERE + i.formsemestre_id=%(formsemestre_id)s and i.formsemestre_id = p.formsemestre_id and p.id = gd.partition_id and gm.etudid = i.etudid