1
0
forked from ScoDoc/ScoDoc

now support several departement for a nip when load formsemestre_bulletinetud

This commit is contained in:
Jean-Marie PLACE 2022-01-22 00:14:39 +01:00
parent 7c89b9a8d3
commit 4df39361fb

View File

@ -290,9 +290,12 @@ def formsemestre_bulletinetud(
if etudid:
etud = models.Identite.query.get_or_404(etudid)
elif code_nip:
etud = models.Identite.query.filter_by(
code_nip=str(code_nip)
).first_or_404()
dept = formsemestre.dept_id
etud = (
models.Identite.query.filter_by(code_nip=str(code_nip))
.filter_by(dept_id=dept)
.first_or_404()
)
elif code_ine:
etud = models.Identite.query.filter_by(
code_ine=str(code_ine)