Prechádzať zdrojové kódy

fix(extras): Conditionally render saved filter dropdown

Only display the saved filter dropdown in table controls when a filter
form is present and includes a filter_id field. This prevents rendering
an empty or non-functional dropdown when saved filters are unavailable.
Martin Hauser 6 dní pred
rodič
commit
1a12f687ee

+ 1 - 1
netbox/templates/inc/table_controls_htmx.html

@@ -18,7 +18,7 @@
     </div>
   </div>
 
-  {% if filter_form %}
+  {% if filter_form and filter_form.filter_id %}
     <div class="col-auto d-print-none">
       <div class="input-group">
         <label for="saved-filter-select" class="input-group-text">