mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixed Prefix list hierarchy
This commit is contained in:
@@ -328,6 +328,11 @@ class PrefixListView(ObjectListView):
|
||||
edit_table_permissions = ['ipam.change_prefix', 'ipam.delete_prefix']
|
||||
template_name = 'ipam/prefix_list.html'
|
||||
|
||||
def alter_queryset(self, request):
|
||||
# Show only top-level prefixes by default
|
||||
limit = None if request.GET.get('expand') else 0
|
||||
return self.queryset.annotate_depth(limit=limit)
|
||||
|
||||
|
||||
def prefix(request, pk):
|
||||
|
||||
|
Reference in New Issue
Block a user