From 8f13605ad3405c59039c1c3746763f1d6e353520 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Mon, 27 Jan 2025 16:32:28 +0100 Subject: [PATCH] fix(relations): hide empty relations tables If the table contains no data, it's better to now show it at all instead of showing empty tables. Closes: #1543 --- apis_core/relations/templates/relations/list_relations.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apis_core/relations/templates/relations/list_relations.html b/apis_core/relations/templates/relations/list_relations.html index eb3d91501..ef35ba329 100644 --- a/apis_core/relations/templates/relations/list_relations.html +++ b/apis_core/relations/templates/relations/list_relations.html @@ -4,7 +4,9 @@ {% block relations_list %} {% relations_list_table relations target as table %} - {% render_table table %} + {% if table.data %} + {% render_table table %} + {% endif %} {% endblock relations_list %} {% block relations_create %}