From 91b453bae70db8d0615adfd4501972d05c644c0e Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 23 Jan 2023 18:00:13 +0100 Subject: [PATCH] add status=3 to conference filter --- teleforma/views/core.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 2b5b68d3..564f2d3b 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -142,12 +142,19 @@ def get_course_conferences(period, course, course_type): already_added = set() # get conference publications publications = ConferencePublication.objects.filter( - period=period, conference__course=course, conference__course_type=course_type).distinct() + period=period, + conference__course=course, + conference__course_type=course_type, + status=3).distinct() for publication in publications: conferences.append(publication.conference) already_added.add(publication.conference.id) - for conference in Conference.objects.filter(period=period, course=course, course_type=course_type): + cc = Conference.objects.filter(period=period, + course=course, + course_type=course_type, + status=3) + for conference in cc: # do not include conferences with publication rules if conference.id not in already_added: conferences.append(conference) -- 2.39.5