From 6205f3ad2f013bfe99bf8301b18ace05af530582 Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 15 Apr 2025 18:37:36 +0200 Subject: [PATCH] refs #1919. Fixed bug when removed partition --- .../partition-assistant/partition-assistant.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts b/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts index a6416f8..14273fb 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/partition-assistant/partition-assistant.component.ts @@ -288,7 +288,9 @@ export class PartitionAssistantComponent { this.loading = true; - const totalPartitionSize = this.selectedDisk.partitions.reduce((sum: any, partition: { size: any; }) => sum + partition.size, 0); + const totalPartitionSize = this.selectedDisk.partitions + .filter((partition: any) => !partition.removed) + .reduce((sum: any, partition: any) => sum + partition.size, 0); if (totalPartitionSize > this.selectedDisk.totalDiskSize) { this.toastService.error('El tamaño total de las particiones en el disco seleccionado excede el tamaño total del disco.');