Move model check to inner conditional

This commit is contained in:
Brian Tiemann 2024-09-18 18:44:48 -04:00
parent a6634a2c8e
commit 8940732a86

View File

@ -15,12 +15,12 @@
{% endwith %} {% endwith %}
</div> </div>
{% if request.htmx and model %} {% if request.htmx %}
{# Include the updated object count for display elsewhere on the page #} {# Include the updated object count for display elsewhere on the page #}
<div hx-swap-oob="innerHTML:.total-object-count">{{ table.rows|length }}</div> <div hx-swap-oob="innerHTML:.total-object-count">{{ table.rows|length }}</div>
{# Update the bulk action buttons with new query parameters #} {# Update the bulk action buttons with new query parameters #}
{% if actions %} {% if actions and model %}
<div class="bulk-action-buttons" hx-swap-oob="outerHTML:.bulk-action-buttons"> <div class="bulk-action-buttons" hx-swap-oob="outerHTML:.bulk-action-buttons">
{% if 'bulk_edit' in actions %} {% if 'bulk_edit' in actions %}
{% bulk_edit_button model query_params=request.GET %} {% bulk_edit_button model query_params=request.GET %}