Skip to content

Commit

Permalink
Merge pull request #12406 from kkthxbye-code/12405-fix-related-vlangroup
Browse files Browse the repository at this point in the history
Fixes #12405 - Fix the filtervar being set to site_id instead of site in SiteView related_models
  • Loading branch information
jeremystretch authored May 1, 2023
2 parents 3fc7c0e + 6206d22 commit f86f4f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/dcim/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def get_extra_context(self, request, instance):
(VLANGroup.objects.restrict(request.user, 'view').filter(
scope_type=ContentType.objects.get_for_model(Site),
scope_id=instance.pk
), 'site_id'),
), 'site'),
(VLAN.objects.restrict(request.user, 'view').filter(site=instance), 'site_id'),
# Circuits
(Circuit.objects.restrict(request.user, 'view').filter(terminations__site=instance).distinct(), 'site_id'),
Expand Down

0 comments on commit f86f4f9

Please sign in to comment.