Skip to content

Commit

Permalink
fix(sdk): check whether mapper exites when query control plane deploy…
Browse files Browse the repository at this point in the history
…ment details (#164)

* remove  unsed logs

* add check: mapper key not null
  • Loading branch information
kuangxiang20240501 authored Nov 15, 2024
1 parent 681c03d commit 46f2826
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ public Paging<TemplateUpgradeDeploymentVO> listTemplateDeployment(
public List<MapperTagVO> templateDeploymentDetailsFromControlDeployment(
UnifiedAssetDto templateDeployment) {
Map<String, List<Tuple2>> apiUseCases = apiComponentService.findApiUseCase();
log.info("apiUseCases : {}", JsonToolkit.toJson(apiUseCases));
ControlDeploymentFacet controlDeploymentFacet =
UnifiedAsset.getFacets(templateDeployment, ControlDeploymentFacet.class);
UpgradeTuple upgradeTuple = controlDeploymentFacet.getUpgradeTuple();
Expand All @@ -346,7 +345,8 @@ public List<MapperTagVO> templateDeploymentDetailsFromControlDeployment(
.filter(Optional::isPresent)
.map(Optional::get)
.map(ApiUseCaseDto::getMapperKey)
.filter(t -> !appProperty.getQueryExcludeAssetKeys().contains(t))
.filter(t -> t != null && !appProperty.getQueryExcludeAssetKeys().contains(t))
.filter(unifiedAssetRepository::existsByKey)
.distinct()
.map(this::getMapperTagVOFromDraft)
.toList();
Expand Down

0 comments on commit 46f2826

Please sign in to comment.