From 2244f29c33016af7389406b039cde2a1c37a3ab2 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 13 Dec 2021 10:20:16 +0100 Subject: [PATCH] Fix: operator priority --- app/scodoc/sco_apogee_compare.py | 4 ++-- app/scodoc/sco_formsemestre_status.py | 2 +- tools/fakeportal/fakeportal.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_apogee_compare.py b/app/scodoc/sco_apogee_compare.py index f116a42b..0ccd9485 100644 --- a/app/scodoc/sco_apogee_compare.py +++ b/app/scodoc/sco_apogee_compare.py @@ -256,8 +256,8 @@ def apo_table_compare_etud_results(A, B): "prenom": "Prénom", "elt_code": "Element", "type_res": "Type", - "val_A": "A: %s" % A.orig_filename or "", - "val_B": "B: %s" % B.orig_filename or "", + "val_A": "A: %s" % (A.orig_filename or ""), + "val_B": "B: %s" % (B.orig_filename or ""), }, columns_ids=("nip", "nom", "prenom", "elt_code", "type_res", "val_A", "val_B"), html_class="table_leftalign", diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 1a018bad..bff2283c 100644 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -1116,7 +1116,7 @@ def formsemestre_tableau_modules( prev_ue_id = None for modimpl in modimpls: mod = Module.query.get(modimpl["module_id"]) - mod_descr = "Module " + mod.titre or "" + mod_descr = "Module " + (mod.titre or "") if mod.is_apc(): coef_descr = ", ".join( [f"{ue_acro}: {co}" for ue_acro, co in mod.ue_coefs_descr()] diff --git a/tools/fakeportal/fakeportal.py b/tools/fakeportal/fakeportal.py index be32524c..0f306cc8 100755 --- a/tools/fakeportal/fakeportal.py +++ b/tools/fakeportal/fakeportal.py @@ -128,7 +128,7 @@ class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler): ) self.send_response(404) return - elif "getPhoto" in self.path or "scodocPhoto" in self.path: + elif ("getPhoto" in self.path) or ("scodocPhoto" in self.path): nip = query_components["nip"][0] self.path = str(get_photo_filename(nip)) print(f"photo for nip={nip}: {self.path}")