Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/main/java/org/gridsuite/study/server/StudyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,7 @@ private CreatedStudyBasicInfos insertStudy(UUID studyUuid, String userId, Networ
return createdStudyBasicInfos;
}

@Transactional
public CreatedStudyBasicInfos insertDuplicatedStudy(BasicStudyInfos studyInfos, StudyEntity sourceStudy, LoadFlowParametersEntity newLoadFlowParameters, String userId, UUID clonedNetworkUuid) {
private CreatedStudyBasicInfos insertDuplicatedStudy(BasicStudyInfos studyInfos, StudyEntity sourceStudy, LoadFlowParametersEntity newLoadFlowParameters, String userId, UUID clonedNetworkUuid) {
Objects.requireNonNull(studyInfos.getId());
Objects.requireNonNull(userId);
Objects.requireNonNull(clonedNetworkUuid);
Expand All @@ -592,7 +591,7 @@ public CreatedStudyBasicInfos insertDuplicatedStudy(BasicStudyInfos studyInfos,

UUID reportUuid = UUID.randomUUID();
StudyEntity studyEntity = new StudyEntity(studyInfos.getId(), userId, LocalDateTime.now(ZoneOffset.UTC), clonedNetworkUuid, sourceStudy.getNetworkId(), sourceStudy.getCaseFormat(), sourceStudy.getCaseUuid(), sourceStudy.isCasePrivate(), sourceStudy.getLoadFlowProvider(), newLoadFlowParameters);
CreatedStudyBasicInfos createdStudyBasicInfos = StudyService.toCreatedStudyBasicInfos(insertDuplicatedStudy(studyEntity, sourceStudy.getId(), reportUuid));
CreatedStudyBasicInfos createdStudyBasicInfos = StudyService.toCreatedStudyBasicInfos(self.insertDuplicatedStudy(studyEntity, sourceStudy.getId(), reportUuid));

studyInfosService.add(createdStudyBasicInfos);
emitStudiesChanged(studyInfos.getId(), userId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public NetworkModificationNode toDto(NetworkModificationNodeInfoEntity node) {
int ignoreSize = node.getModificationsToExclude().size(); // to load the lazy collection
return completeNodeInfo(node, new NetworkModificationNode(node.getNetworkModificationId(),
node.getVariantId(),
node.getModificationsToExclude(),
new HashSet<>(node.getModificationsToExclude()),
node.getLoadFlowStatus(),
StudyService.fromEntity(node.getLoadFlowResult()),
node.getSecurityAnalysisResultUuid(),
Expand Down