forked from ScoDoc/ScoDoc
Fix: aliased join / SQLAlchemy 2
This commit is contained in:
parent
f9da8c1d8d
commit
74e37f31b3
@ -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)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user