|
@@ -420,13 +420,7 @@ def prefix(request, pk):
|
|
|
duplicate_prefix_table.exclude = ('vrf',)
|
|
|
|
|
|
|
|
|
- if prefix.vrf:
|
|
|
-
|
|
|
- child_prefixes = Prefix.objects.filter(vrf=prefix.vrf)
|
|
|
- else:
|
|
|
-
|
|
|
- child_prefixes = Prefix.objects.all()
|
|
|
- child_prefixes = child_prefixes.filter(prefix__net_contained=str(prefix.prefix))\
|
|
|
+ child_prefixes = Prefix.objects.filter(vrf=prefix.vrf, prefix__net_contained=str(prefix.prefix))\
|
|
|
.select_related('site', 'role').annotate_depth(limit=0)
|
|
|
if child_prefixes:
|
|
|
child_prefixes = add_available_prefixes(prefix.prefix, child_prefixes)
|