From a43ba87e0741f2eea839c247d44a52eb123c66fb Mon Sep 17 00:00:00 2001 From: Francesco Filicetti Date: Wed, 11 Dec 2024 13:28:18 +0100 Subject: [PATCH] fix: teacher publicazions if cessato --- teachers/api/v1/services.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/teachers/api/v1/services.py b/teachers/api/v1/services.py index fb540224..b250ccf4 100644 --- a/teachers/api/v1/services.py +++ b/teachers/api/v1/services.py @@ -1128,7 +1128,9 @@ def getPublicationsList( if pub_type is not None: query_type = Q(collection_id__community_id__community_id=pub_type) if teacherid: - query_teacher = Q(pubblicazioneautori__ab__matricola=teacherid) + cod_fis = Personale.objects.filter(matricola=teacherid).first() + if not cod_fis: raise Http404 + query_teacher = Q(pubblicazioneautori__codice_fiscale=cod_fis) if structure: query_structure = Q(pubblicazioneautori__ab__cd_uo_aff_org=structure) query = (