remove stash data when un loading study - #1062
Conversation
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // remove stashed modification on not stashed nodes | ||
| List<NetworkModificationNode> networkModificationNodeInfos = networkModificationNodeInfoRepository | ||
| .findAllById(notStashedNodes.stream().map(NodeEntity::getIdNode).toList()) | ||
| .stream().map(NetworkModificationNodeInfoEntity::toDto).toList(); |
There was a problem hiding this comment.
Why do you need to pass throught the DTO, this is strange, NetworkModificationNodeInfoEntity already has the modificationGroupUuid member
| // remove modification on stashed nodes | ||
| List<NetworkModificationNode> networkModificationNodeInfosToDelete = networkModificationNodeInfoRepository | ||
| .findAllById(stashedNodes.stream().map(NodeEntity::getIdNode).toList()) | ||
| .stream().map(NetworkModificationNodeInfoEntity::toDto).toList(); |
| List<UUID> stashedModificationGroupUuids = networkModificationNodeInfos.stream() | ||
| .map(NetworkModificationNode::getModificationGroupUuid) | ||
| .toList(); | ||
| networkModificationService.deleteStashedModificationsGroups(stashedModificationGroupUuids); |
There was a problem hiding this comment.
Does a stashed modification exists in a group which contain a non stashed modification in a non stashed node ?
I see that when we stash a node, we call deleteStashedModifications. it's not clear for me i will investigate.
sBouzols
left a comment
There was a problem hiding this comment.
Maybe add a comment in the Supervision Controller here:
@DeleteMapping(value = "/studies/{studyUuid}/invalidate")
@Operation(summary = "Invalidate built nodes and delete root node network")
suggestion:
@DeleteMapping(value = "/studies/{studyUuid}/invalidate")
@Operation(summary = "Invalidate all node tree, clean stashed elements and delete root networks")
|



PR Summary