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
|
@Override
|
||||||
public Mono<Void> updateRefactoredEntity(RefactorEntityNameDTO refactorEntityNameDTO, String branchName) {
|
public Mono<Void> updateRefactoredEntity(RefactorEntityNameDTO refactorEntityNameDTO, String branchName) {
|
||||||
return newActionService
|
return newActionService
|
||||||
.findActionDTObyIdAndViewMode(
|
.findByBranchNameAndDefaultActionId(
|
||||||
refactorEntityNameDTO.getActionId(), false, actionPermission.getEditPermission())
|
branchName, refactorEntityNameDTO.getActionId(), actionPermission.getEditPermission())
|
||||||
|
.flatMap(branchedAction -> newActionService.generateActionByViewMode(branchedAction, false))
|
||||||
.flatMap(action -> {
|
.flatMap(action -> {
|
||||||
action.setName(refactorEntityNameDTO.getNewName());
|
action.setName(refactorEntityNameDTO.getNewName());
|
||||||
if (StringUtils.hasLength(refactorEntityNameDTO.getCollectionName())) {
|
if (StringUtils.hasLength(refactorEntityNameDTO.getCollectionName())) {
|
||||||
action.setFullyQualifiedName(refactorEntityNameDTO.getNewFullyQualifiedName());
|
action.setFullyQualifiedName(refactorEntityNameDTO.getNewFullyQualifiedName());
|
||||||
}
|
}
|
||||||
return newActionService.updateUnpublishedAction(refactorEntityNameDTO.getActionId(), action);
|
return newActionService.updateUnpublishedAction(action.getId(), action);
|
||||||
})
|
})
|
||||||
.then();
|
.then();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user