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