diff --git a/docs/release-notes/version-3.2.md b/docs/release-notes/version-3.2.md index c6f5ecc31..5ba8a4371 100644 --- a/docs/release-notes/version-3.2.md +++ b/docs/release-notes/version-3.2.md @@ -157,6 +157,7 @@ Where it is desired to limit the range of available VLANs within a group, users * [#8970](https://github.com/netbox-community/netbox/issues/8970) - Permit nested inventory item templates on device types * [#8976](https://github.com/netbox-community/netbox/issues/8976) - Add missing `object_type` field on CustomField REST API serializer * [#8978](https://github.com/netbox-community/netbox/issues/8978) - Fix instantiation of front ports when provisioning a module +* [#9007](https://github.com/netbox-community/netbox/issues/9007) - Fix FieldError exception when instantiating a device type with nested inventory items ### Other Changes diff --git a/netbox/dcim/models/device_component_templates.py b/netbox/dcim/models/device_component_templates.py index 01f1cd1be..b363d6ea4 100644 --- a/netbox/dcim/models/device_component_templates.py +++ b/netbox/dcim/models/device_component_templates.py @@ -551,7 +551,7 @@ class InventoryItemTemplate(MPTTModel, ComponentTemplateModel): unique_together = ('device_type', 'parent', 'name') def instantiate(self, **kwargs): - parent = InventoryItemTemplate.objects.get(name=self.parent.name, **kwargs) if self.parent else None + parent = InventoryItem.objects.get(name=self.parent.name, **kwargs) if self.parent else None if self.component: model = self.component.component_model component = model.objects.get(name=self.component.name, **kwargs)