From 56cbd20e65e55b72e2013d6c9d468ac4efc332cc Mon Sep 17 00:00:00 2001 From: Mirkk Date: Wed, 8 May 2024 11:32:51 +0200 Subject: [PATCH] Update NetworkEquipment.php - Stacked switch Name with ID Stacked switches got a name with the "description" (model) field, all switches the same, which gives several issues in managing them. It seems that this was just a wrong copy-paste from the previous code line. Corrected with _$SwitchID as a common naming scheme. --- src/Inventory/Asset/NetworkEquipment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Inventory/Asset/NetworkEquipment.php b/src/Inventory/Asset/NetworkEquipment.php index 1b476575200..07fbd1b04d3 100644 --- a/src/Inventory/Asset/NetworkEquipment.php +++ b/src/Inventory/Asset/NetworkEquipment.php @@ -137,7 +137,7 @@ public function prepare(): array $stack->model = $switch->model; $stack->$model_field = $switch->model; $stack->description = $stack->name . ' - ' . ($switch->name ?? $switch->description); - $stack->name = $stack->name . ' - ' . ($switch->name ?? $switch->description); + $stack->name = $stack->name . '_' . $switch->stack_number; $stack->stack_number = $switch->stack_number ?? null; $this->data[] = $stack; }