Skip to content

Commit 49290b1

Browse files
authored
Fix for removal of orphaned node (#532)
1 parent efeccd8 commit 49290b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

matter_server/server/device_controller.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,9 @@ async def remove_node(self, node_id: int) -> None:
642642
0,
643643
Clusters.OperationalCredentials.Attributes.CurrentFabricIndex,
644644
)
645-
fabric_index = node.attributes[attribute_path]
645+
fabric_index = node.attributes.get(attribute_path)
646+
if fabric_index is None:
647+
return
646648
result: Clusters.OperationalCredentials.Commands.NOCResponse | None = None
647649
try:
648650
result = await self.chip_controller.SendCommand(

0 commit comments

Comments
 (0)