From 2d47e3041688769205353d5a94374720bd7d9ef1 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Thu, 1 Feb 2024 21:19:12 +0100 Subject: [PATCH] fix: types could be empty list * it is true that types will always exists, but it could be an empty --- .../templates/invenio_theme_tugraz/recent_uploads.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html b/invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html index 352fb84..d992e46 100644 --- a/invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html +++ b/invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html @@ -30,9 +30,11 @@ {# Resource type badge #} - - {{ r.metadata.types[0] }} - + {% if r.metadata.types | length > 0%} + + {{ r.metadata.types[0] }} + + {% endif %}