From 125041f6fa0afef7ae12386c9f691aed274512d8 Mon Sep 17 00:00:00 2001 From: LE SAULNIER Kevin Date: Mon, 9 Sep 2024 10:59:33 +0200 Subject: [PATCH] fix: PR remarks Signed-off-by: LE SAULNIER Kevin --- .../modification/server/NetworkModificationController.java | 7 +++---- .../modification/server/dto/ModificationInfos.java | 2 +- .../attribute/EquipmentAttributeModificationEntity.java | 1 - .../modifications/LineCreationInMixedTypologyTest.java | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/gridsuite/modification/server/NetworkModificationController.java b/src/main/java/org/gridsuite/modification/server/NetworkModificationController.java index 7240f7094..70f1c0bac 100644 --- a/src/main/java/org/gridsuite/modification/server/NetworkModificationController.java +++ b/src/main/java/org/gridsuite/modification/server/NetworkModificationController.java @@ -243,12 +243,11 @@ public ResponseEntity stashNetworkModifications( } @PutMapping(value = "/network-modifications", produces = MediaType.APPLICATION_JSON_VALUE, params = "active") - @Operation(summary = "stash or unstash network modifications") - @ApiResponse(responseCode = "200", description = "The network modifications were stashed") + @Operation(summary = "enable or disable network modifications") + @ApiResponse(responseCode = "200", description = "The network modifications were updated successfully") public ResponseEntity updateNetworkModificationsActivation( @Parameter(description = "Network modification UUIDs") @RequestParam("uuids") List networkModificationUuids, - @Parameter(description = "Group UUID") @RequestParam("groupUuid") UUID groupUuid, - @Parameter(description = "stash or unstash network modifications") @RequestParam(name = "active") Boolean active) { + @Parameter(description = "enable or disable network modifications") @RequestParam(name = "active") Boolean active) { networkModificationService.updateNetworkModificationActivation(networkModificationUuids, active); return ResponseEntity.ok().build(); } diff --git a/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java b/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java index 066a7acfa..e28ac9f55 100644 --- a/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java +++ b/src/main/java/org/gridsuite/modification/server/dto/ModificationInfos.java @@ -101,7 +101,7 @@ public class ModificationInfos { private String messageValues; @Schema(description = "Modification enabled") - @NonNull + @Builder.Default private Boolean active = true; // Only for metadata diff --git a/src/main/java/org/gridsuite/modification/server/entities/equipment/modification/attribute/EquipmentAttributeModificationEntity.java b/src/main/java/org/gridsuite/modification/server/entities/equipment/modification/attribute/EquipmentAttributeModificationEntity.java index 71272486c..0145bba03 100644 --- a/src/main/java/org/gridsuite/modification/server/entities/equipment/modification/attribute/EquipmentAttributeModificationEntity.java +++ b/src/main/java/org/gridsuite/modification/server/entities/equipment/modification/attribute/EquipmentAttributeModificationEntity.java @@ -71,7 +71,6 @@ public EquipmentAttributeModificationInfos toModificationInfos() { .date(getDate()) .stashed(getStashed()) .active(getActive()) - .active(getActive()) .equipmentId(getEquipmentId()) .equipmentAttributeName(getAttributeName()) .equipmentAttributeValue(getAttributeValue()) diff --git a/src/test/java/org/gridsuite/modification/server/modifications/LineCreationInMixedTypologyTest.java b/src/test/java/org/gridsuite/modification/server/modifications/LineCreationInMixedTypologyTest.java index 731069245..541577bbd 100644 --- a/src/test/java/org/gridsuite/modification/server/modifications/LineCreationInMixedTypologyTest.java +++ b/src/test/java/org/gridsuite/modification/server/modifications/LineCreationInMixedTypologyTest.java @@ -44,7 +44,6 @@ protected ModificationInfos buildModification() { return LineCreationInfos.builder() .stashed(false) .active(true) - .active(true) .equipmentId("idLine1") .equipmentName("nameLine1") .r(100.0)