From abdc4855f26f32e0d3a18f738a22bf395727d928 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 09:27:05 -0500 Subject: [PATCH] Bind location field to selected site --- netbox/dcim/forms/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netbox/dcim/forms/models.py b/netbox/dcim/forms/models.py index 0eb99e8c6..da50b8f2a 100644 --- a/netbox/dcim/forms/models.py +++ b/netbox/dcim/forms/models.py @@ -880,6 +880,9 @@ class PowerFeedForm(NetBoxModelForm): location = DynamicModelChoiceField( queryset=Location.objects.all(), required=False, + query_params={ + 'site_id': '$site' + }, initial_params={ 'racks': '$rack' }