瀏覽代碼

Closes #11922: Populate assigned VDCs when adding a child interface

Jeremy Stretch 2 年之前
父節點
當前提交
2236b86c35
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      netbox/dcim/forms/model_forms.py

+ 3 - 0
netbox/dcim/forms/model_forms.py

@@ -1042,6 +1042,9 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm):
         queryset=VirtualDeviceContext.objects.all(),
         required=False,
         label='Virtual Device Contexts',
+        initial_params={
+            'interfaces': '$parent',
+        },
         query_params={
             'device_id': '$device',
         }