From a82589a3628536d65286d0ab7591088572872186 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 27 Aug 2023 11:16:06 +0200 Subject: [PATCH] Fix: aliased join / SQLAlchemy 2 --- app/scodoc/sco_edit_ue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index 73bcd100..39360d5f 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -1389,14 +1389,14 @@ def ue_sharing_code(ue_code: str = "", ue_id: int = None, hide_ue_id: int = None # UE du même code, code formation et departement: q_ues = ( UniteEns.query.filter_by(ue_code=ue_code) - .join(UniteEns.formation, aliased=True) + .join(UniteEns.formation) .filter_by(dept_id=g.scodoc_dept_id, formation_code=formation_code) ) else: # Toutes les UE du departement avec ce code: q_ues = ( UniteEns.query.filter_by(ue_code=ue_code) - .join(UniteEns.formation, aliased=True) + .join(UniteEns.formation) .filter_by(dept_id=g.scodoc_dept_id) )