From ee9105269c0e1809e867a2272777a608e58aee91 Mon Sep 17 00:00:00 2001 From: kmbn Date: Thu, 20 Jul 2017 11:10:53 +0200 Subject: [PATCH] Fix dataset count display for groups Dataset counts were not displayed at all for group items because the template checked `packages` rather than `package_count`. --- ckan/templates/group/snippets/group_item.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckan/templates/group/snippets/group_item.html b/ckan/templates/group/snippets/group_item.html index ae69eb707c7..407f631825a 100644 --- a/ckan/templates/group/snippets/group_item.html +++ b/ckan/templates/group/snippets/group_item.html @@ -28,9 +28,9 @@

{{ group.display_name }}

{% endif %} {% endblock %} {% block datasets %} - {% if group.packages %} - {{ ungettext('{num} Dataset', '{num} Datasets', group.packages).format(num=group.packages) }} - {% elif group.packages == 0 %} + {% if group.package_count %} + {{ ungettext('{num} Dataset', '{num} Datasets', group.package_count).format(num=group.package_count) }} + {% elif group.package_count == 0 %} {{ _('0 Datasets') }} {% endif %} {% endblock %}