diff --git a/matter_server/server/device_controller.py b/matter_server/server/device_controller.py index 643a1e0d..662c8c8a 100644 --- a/matter_server/server/device_controller.py +++ b/matter_server/server/device_controller.py @@ -642,7 +642,9 @@ async def remove_node(self, node_id: int) -> None: 0, Clusters.OperationalCredentials.Attributes.CurrentFabricIndex, ) - fabric_index = node.attributes[attribute_path] + fabric_index = node.attributes.get(attribute_path) + if fabric_index is None: + return result: Clusters.OperationalCredentials.Commands.NOCResponse | None = None try: result = await self.chip_controller.SendCommand(