Skip to content

Commit

Permalink
Revert "Add disable_htmx property on ObjectChildrenView to allow IP a…
Browse files Browse the repository at this point in the history
…ssignment flow to avoid htmx fragmentary rendering on object save"

This reverts commit fa8f2ac.
  • Loading branch information
bctiemann committed Dec 17, 2024
1 parent fa8f2ac commit ccfda54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion netbox/dcim/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,6 @@ class DeviceInterfacesView(DeviceComponentsView):
filterset = filtersets.InterfaceFilterSet
filterset_form = forms.InterfaceFilterForm
template_name = 'dcim/device/interfaces.html'
disable_htmx = True
tab = ViewTab(
label=_('Interfaces'),
badge=lambda obj: obj.vc_interfaces().count(),
Expand Down
4 changes: 1 addition & 3 deletions netbox/netbox/views/generic/object_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ class ObjectChildrenView(ObjectView, ActionsMixin, TableMixin):
filterset = None
filterset_form = None
template_name = 'generic/object_children.html'
# Currently used only to work around the singular behavior of the IP assignment flow in DeviceInterfacesView
disable_htmx = False

def get_children(self, request, parent):
"""
Expand Down Expand Up @@ -144,7 +142,7 @@ def get(self, request, *args, **kwargs):
table = self.get_table(table_data, request, has_bulk_actions)

# If this is an HTMX request, return only the rendered table HTML
if htmx_partial(request) and not self.disable_htmx:
if htmx_partial(request):
return render(request, 'htmx/table.html', {
'object': instance,
'table': table,
Expand Down

0 comments on commit ccfda54

Please sign in to comment.