1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#6732 - Swap ASN M2M to Site model and update some templates/filters

This commit is contained in:
Daniel Sheppard
2021-11-02 12:26:06 -05:00
parent 330c498fe4
commit 7625a2dd3c
12 changed files with 120 additions and 29 deletions

View File

@@ -214,13 +214,10 @@ class ASNView(generic.ObjectView):
queryset = ASN.objects.all()
def get_extra_context(self, request, instance):
sites_table = SiteTable(
list(instance.sites.all()),
orderable=False
)
sites = instance.sites.restrict(request.user, 'view').all()
return {
'sites_table': sites_table,
'sites': sites,
}