Skip to content

Commit

Permalink
Update NetworkEquipment.php - Stacked switch Name with ID
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mirkk committed May 8, 2024
1 parent 30f7e40 commit 56cbd20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Inventory/Asset/NetworkEquipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 56cbd20

Please sign in to comment.