Merge pull request #6803 from ViacheslavKlimov/vc-fixes

[WIP] [3.4] Version control fixes
This commit is contained in:
Andrew Shvayka 2022-06-23 15:44:36 +03:00 committed by GitHub
commit 71ed6abee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 23 deletions

View File

@ -484,7 +484,6 @@ public class EntitiesVersionControlController extends BaseController {
MARKDOWN_CODE_BLOCK_END) MARKDOWN_CODE_BLOCK_END)
@GetMapping("/branches") @GetMapping("/branches")
public DeferredResult<List<BranchInfo>> listBranches() throws Exception { public DeferredResult<List<BranchInfo>> listBranches() throws Exception {
try {
accessControlService.checkPermission(getCurrentUser(), Resource.VERSION_CONTROL, Operation.READ); accessControlService.checkPermission(getCurrentUser(), Resource.VERSION_CONTROL, Operation.READ);
final TenantId tenantId = getTenantId(); final TenantId tenantId = getTenantId();
ListenableFuture<List<BranchInfo>> branches = versionControlService.listBranches(tenantId); ListenableFuture<List<BranchInfo>> branches = versionControlService.listBranches(tenantId);
@ -504,9 +503,6 @@ public class EntitiesVersionControlController extends BaseController {
.map(b -> new BranchInfo(b.getName(), false)).collect(Collectors.toList())); .map(b -> new BranchInfo(b.getName(), false)).collect(Collectors.toList()));
return infos; return infos;
}, MoreExecutors.directExecutor())); }, MoreExecutors.directExecutor()));
} catch (Exception e) {
throw handleException(e);
}
} }
} }

View File

@ -357,6 +357,7 @@ public class DefaultEntitiesVersionControlService implements EntitiesVersionCont
return EntityImportSettings.builder() return EntityImportSettings.builder()
.updateRelations(config.isLoadRelations()) .updateRelations(config.isLoadRelations())
.saveAttributes(config.isLoadAttributes()) .saveAttributes(config.isLoadAttributes())
.saveCredentials(config.isLoadCredentials())
.findExistingByName(config.isFindExistingEntityByName()) .findExistingByName(config.isFindExistingEntityByName())
.build(); .build();
} }