Skip to content

Commit

Permalink
fix: docenti cessati
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Oct 4, 2023
1 parent c64edca commit d806bf6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ricerca_app/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,10 @@ def teachersList(search, regdid, dip, role, cds, year):
'middle_name') \
.distinct()

if not regdid:
# se visualizzo i docenti di un corso (anche passato)
# mostro anche quelli che sono cessati
# altrimenti solo quelli attivi
if not regdid and not cds:
query = query.filter(flg_cessato=0)

if dip:
Expand Down Expand Up @@ -1906,7 +1909,8 @@ def getAttivitaFormativeByDocente(teacher, year, yearFrom, yearTo):
def getDocenteInfo(teacher):
query1 = Personale.objects.filter(
didatticacopertura__af__isnull=False,
matricola__exact=teacher).distinct()
matricola__exact=teacher,
flg_cessato=0).distinct()
query2 = Personale.objects.filter(
fl_docente=1,
flg_cessato=0,
Expand Down Expand Up @@ -3042,7 +3046,8 @@ def getPersonale(personale_id):
else:
q["Roles"] = roles


if not query:
raise Http404
return query

@staticmethod
Expand Down

0 comments on commit d806bf6

Please sign in to comment.