1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge develop into feature

This commit is contained in:
jeremystretch
2022-03-24 16:35:35 -04:00
parent df2f6d4a7d
commit 58f97bc0e7
11 changed files with 29 additions and 20 deletions

View File

@ -574,11 +574,6 @@ class DeviceForm(TenancyForm, NetBoxModelForm):
# can be flipped from one face to another.
self.fields['position'].widget.add_query_param('exclude', self.instance.pk)
# Limit platform by manufacturer
self.fields['platform'].queryset = Platform.objects.filter(
Q(manufacturer__isnull=True) | Q(manufacturer=self.instance.device_type.manufacturer)
)
# Disable rack assignment if this is a child device installed in a parent device
if self.instance.device_type.is_child_device and hasattr(self.instance, 'parent_bay'):
self.fields['site'].disabled = True