mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-12 11:29:36 -06:00
feat(forms): Add context handling for ModuleBay field (#20586)
This commit is contained in:
parent
bbb330becf
commit
5334c8143c
@ -755,7 +755,10 @@ class ModuleForm(ModuleCommonForm, NetBoxModelForm):
|
|||||||
queryset=ModuleBay.objects.all(),
|
queryset=ModuleBay.objects.all(),
|
||||||
query_params={
|
query_params={
|
||||||
'device_id': '$device'
|
'device_id': '$device'
|
||||||
}
|
},
|
||||||
|
context={
|
||||||
|
'disabled': 'installed_module',
|
||||||
|
},
|
||||||
)
|
)
|
||||||
module_type = DynamicModelChoiceField(
|
module_type = DynamicModelChoiceField(
|
||||||
label=_('Module type'),
|
label=_('Module type'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user