fix: Update refactored entity by branched id (#28741)
This commit is contained in:
parent
c0cd0f24cc
commit
e64f7f3e14
|
|
@ -114,14 +114,15 @@ public class NewActionRefactoringServiceCEImpl implements EntityRefactoringServi
|
|||
@Override
|
||||
public Mono<Void> updateRefactoredEntity(RefactorEntityNameDTO refactorEntityNameDTO, String branchName) {
|
||||
return newActionService
|
||||
.findActionDTObyIdAndViewMode(
|
||||
refactorEntityNameDTO.getActionId(), false, actionPermission.getEditPermission())
|
||||
.findByBranchNameAndDefaultActionId(
|
||||
branchName, refactorEntityNameDTO.getActionId(), actionPermission.getEditPermission())
|
||||
.flatMap(branchedAction -> newActionService.generateActionByViewMode(branchedAction, false))
|
||||
.flatMap(action -> {
|
||||
action.setName(refactorEntityNameDTO.getNewName());
|
||||
if (StringUtils.hasLength(refactorEntityNameDTO.getCollectionName())) {
|
||||
action.setFullyQualifiedName(refactorEntityNameDTO.getNewFullyQualifiedName());
|
||||
}
|
||||
return newActionService.updateUnpublishedAction(refactorEntityNameDTO.getActionId(), action);
|
||||
return newActionService.updateUnpublishedAction(action.getId(), action);
|
||||
})
|
||||
.then();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user