From d902ba6fd8f909be4f75d300bd0eda98f9ba04ed Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 31 Jan 2017 15:04:19 +0100 Subject: [PATCH] filter empty identifiers for curriculum --- curriculum/templatetags/curriculum_tags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/curriculum/templatetags/curriculum_tags.py b/curriculum/templatetags/curriculum_tags.py index cc37d0e..983ceac 100755 --- a/curriculum/templatetags/curriculum_tags.py +++ b/curriculum/templatetags/curriculum_tags.py @@ -22,6 +22,8 @@ def competence(texts, level): @register.inclusion_tag("curriculum/snippets/curriculum.html") def curriculum(identifiers): + # shouldn't be needed, but is + identifiers = [id for id in identifiers if id] try: currs = [Curriculum.objects.get(identifier__iexact=identifier.replace(' ', '')) for identifier in identifiers] -- 2.20.1