From f123532cee65738736f9774334fdfb2767ca6b44 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Fri, 1 Feb 2019 09:59:37 +0100 Subject: [PATCH] students were able to add new copy to synthesis note despite not being allowed to --- teleforma/views/crfpa.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index 6d4c2810..e3f93a5c 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -91,19 +91,19 @@ def get_crfpa_courses(user, date_order=False, num_order=False, period=None): types=s_courses[course]) synthesis_note = training.synthesis_note - if synthesis_note: + if synthesis_note.count(): courses = format_courses(courses, queryset=Course.objects.filter(synthesis_note=True), types=synthesis_note) obligation = training.obligation - if obligation: + if obligation.count(): courses = format_courses(courses, queryset=Course.objects.filter(obligation=True), types=obligation) magistral = training.magistral - if magistral: + if magistral.count(): courses = format_courses(courses, queryset=Course.objects.filter(magistral=True), types=magistral) -- 2.39.5