Skip to content

Commit

Permalink
add withsabstation creation boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
ghazwarhili committed Dec 8, 2024
1 parent a5c2ed5 commit 81bb52f
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
*/
package org.gridsuite.modification.server.entities.equipment.creation;

import com.powsybl.iidm.network.SwitchKind;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.gridsuite.modification.dto.CouplingDeviceInfos;
import org.gridsuite.modification.dto.ModificationInfos;
import org.gridsuite.modification.dto.VoltageLevelCreationInfos;

import com.powsybl.iidm.network.SwitchKind;

import jakarta.persistence.*;
import org.gridsuite.modification.server.entities.equipment.modification.FreePropertyEntity;
import org.springframework.util.CollectionUtils;

Expand Down Expand Up @@ -143,7 +141,8 @@ private void assignAttributes(VoltageLevelCreationInfos voltageLevelCreationInfo
this.sectionCount = voltageLevelCreationInfos.getSectionCount();
this.switchKinds = new ArrayList<>(voltageLevelCreationInfos.getSwitchKinds());
this.couplingDevices = toEmbeddableCouplingDevices(voltageLevelCreationInfos.getCouplingDevices());
this.substationCreation = new SubstationCreationEntity(voltageLevelCreationInfos.getSubstationCreation());
this.substationCreation = voltageLevelCreationInfos.isWithSubstationCreation() ?
new SubstationCreationEntity(voltageLevelCreationInfos.getSubstationCreation()) : null;
}
}

0 comments on commit 81bb52f

Please sign in to comment.