diff --git a/src/main/java/org/gridsuite/modification/server/modifications/TwoWindingsTransformerModification.java b/src/main/java/org/gridsuite/modification/server/modifications/TwoWindingsTransformerModification.java index 15118ccf5..780a335db 100644 --- a/src/main/java/org/gridsuite/modification/server/modifications/TwoWindingsTransformerModification.java +++ b/src/main/java/org/gridsuite/modification/server/modifications/TwoWindingsTransformerModification.java @@ -209,9 +209,9 @@ private void processPhaseTapChanger(Network network, } List regulationReports = new ArrayList<>(); - PhaseTapChanger.RegulationMode regulationMode = isModification && - phaseTapChangerInfos.getRegulationMode() != null ? phaseTapChangerInfos.getRegulationMode().getValue() : null; - if (phaseTapChangerInfos.getRegulationMode() != null && phaseTapChangerInfos.getRegulationMode().getValue() != null) { + PhaseTapChanger.RegulationMode regulationMode = isModification ? phaseTapChanger.getRegulationMode() : null; + if (phaseTapChangerInfos.getRegulationMode() != null + && phaseTapChangerInfos.getRegulationMode().getValue() != null) { regulationMode = phaseTapChangerInfos.getRegulationMode().getValue(); }