From: Yoan Le Clanche Date: Fri, 1 Feb 2019 08:59:37 +0000 (+0100) Subject: students were able to add new copy to synthesis note despite not being allowed to X-Git-Tag: 1.4.0~8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f123532cee65738736f9774334fdfb2767ca6b44;p=teleforma.git students were able to add new copy to synthesis note despite not being allowed to --- 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)