From ab8a44cede93ced1d2b89711b3cb93fce6a52241 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Sun, 12 Sep 2021 00:47:34 -0700 Subject: [PATCH] fix(FastAPI): only show comments partial if they exist This was incorrectly displaying a comment section header when no comments existed. Signed-off-by: Kevin Morris --- templates/packages/show.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/packages/show.html b/templates/packages/show.html index 7a5aae2d..7480f573 100644 --- a/templates/packages/show.html +++ b/templates/packages/show.html @@ -18,6 +18,7 @@ {% set pkgname = result.Name %} {% set pkgbase_id = result.ID %} - {% set comments = comments %} - {% include "partials/packages/comments.html" %} + {% if comments.count() %} + {% include "partials/packages/comments.html" %} + {% endif %} {% endblock %}