From d5268725022a60dfe5f2fa2998975c57b8b636a5 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 26 Jan 2016 16:27:50 +0100 Subject: [PATCH] bugfix: list all objects, not just those with description --- src/catalogue/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 847831d69..297339ebe 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -712,12 +712,12 @@ def tag_catalogue(request, category): else: tags = list(get_top_level_related_tags((), categories=(category,))) - tags = [tag for tag in tags if tag.description] + described_tags = [tag for tag in tags if tag.description] - if len(tags) > 4: - best = random.sample(tags, 4) + if len(described_tags) > 4: + best = random.sample(described_tags, 4) else: - best = tags + best = described_tags return render(request, 'catalogue/tag_catalogue.html', { 'tags': tags, -- 2.20.1