feat(forms): Add context handling for ModuleBay field (#20586)

This commit is contained in:
Martin Hauser 2025-10-20 19:16:53 +02:00 committed by GitHub
parent bbb330becf
commit 5334c8143c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'),