From 5614bd06635c30fb9fb93ba7af70c555bcfe6d7e Mon Sep 17 00:00:00 2001 From: Jean-Marie Place Date: Mon, 20 Feb 2023 10:53:29 +0100 Subject: [PATCH 1/2] fix typo --- app/scodoc/sco_formations.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index 93d0e1fb4..7a77029ea 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -494,20 +494,18 @@ def formation_list_table(formation_id=None, args={}): else: f["date_fin_dernier_sem"] = "" f["annee_dernier_sem"] = "" - locked = formation_has_locked_sems(f["formation_id"]) + formation: Formation = Formation.query.get_or_404(f["formation_id"]) + locked = formation.has_locked_sems() # if locked: but_locked = lockicon else: but_locked = '' if editable and not locked: - but_suppr = ( - '%s' - % ( - f["formation_id"], - f["acronyme"].lower().replace(" ", "-"), - suppricon, - ) + but_suppr = '%s' % ( + f["formation_id"], + f["acronyme"].lower().replace(" ", "-"), + suppricon, ) else: but_suppr = '' From 67fc20fe2a4783ad59eed3ab0096b151c4ccecf4 Mon Sep 17 00:00:00 2001 From: Jean-Marie Place Date: Mon, 20 Feb 2023 12:34:32 +0100 Subject: [PATCH 2/2] cancel black formatting --- app/scodoc/sco_formations.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index 7a77029ea..a109cf5e9 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -502,10 +502,13 @@ def formation_list_table(formation_id=None, args={}): else: but_locked = '' if editable and not locked: - but_suppr = '%s' % ( - f["formation_id"], - f["acronyme"].lower().replace(" ", "-"), - suppricon, + but_suppr = ( + '%s' + % ( + f["formation_id"], + f["acronyme"].lower().replace(" ", "-"), + suppricon, + ) ) else: but_suppr = ''