From aff72b132c3d26c635573bb6a1c60e13ff2cd169 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 5 Apr 2024 09:45:35 -0400 Subject: [PATCH] Fix loading links from within embedded tables --- netbox/templates/inc/table_htmx.html | 3 +-- netbox/utilities/htmx.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/netbox/templates/inc/table_htmx.html b/netbox/templates/inc/table_htmx.html index 7fb78dfe4..06d3d9b72 100644 --- a/netbox/templates/inc/table_htmx.html +++ b/netbox/templates/inc/table_htmx.html @@ -1,9 +1,8 @@ {% load django_tables2 %} - + {% if table.show_header %} diff --git a/netbox/utilities/htmx.py b/netbox/utilities/htmx.py index 9f86397bc..91a2c5ada 100644 --- a/netbox/utilities/htmx.py +++ b/netbox/utilities/htmx.py @@ -10,4 +10,4 @@ def htmx_partial(request): Determines whether to render partial (versus complete) HTML content in response to an HTMX request, based on the target element. """ - return request.htmx and request.htmx.target != PAGE_CONTAINER_ID + return request.htmx and request.htmx.target and request.htmx.target != PAGE_CONTAINER_ID