mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 12:06:53 -06:00
Fixes #8213: Fix ValueError exception under prefix IP addresses view
This commit is contained in:
parent
79bebf7c9b
commit
e11e8a5d64
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v3.1.5 (FUTURE)
|
## v3.1.5 (FUTURE)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#8213](https://github.com/netbox-community/netbox/issues/8213) - Fix ValueError exception under prefix IP addresses view
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## v3.1.4 (2022-01-03)
|
## v3.1.4 (2022-01-03)
|
||||||
|
@ -505,9 +505,7 @@ class PrefixIPAddressesView(generic.ObjectChildrenView):
|
|||||||
template_name = 'ipam/prefix/ip_addresses.html'
|
template_name = 'ipam/prefix/ip_addresses.html'
|
||||||
|
|
||||||
def get_children(self, request, parent):
|
def get_children(self, request, parent):
|
||||||
return parent.get_child_ips().restrict(request.user, 'view').prefetch_related(
|
return parent.get_child_ips().restrict(request.user, 'view').prefetch_related('vrf', 'tenant')
|
||||||
'vrf', 'role', 'tenant',
|
|
||||||
)
|
|
||||||
|
|
||||||
def prep_table_data(self, request, queryset, parent):
|
def prep_table_data(self, request, queryset, parent):
|
||||||
show_available = bool(request.GET.get('show_available', 'true') == 'true')
|
show_available = bool(request.GET.get('show_available', 'true') == 'true')
|
||||||
|
Loading…
Reference in New Issue
Block a user