Skip to content

Commit

Permalink
return all consumed relations on /resourceGroups/{resourceGroupId}/re…
Browse files Browse the repository at this point in the history
…leases/{releaseId}
  • Loading branch information
yvespp committed Jan 27, 2022
1 parent 1bf18f9 commit 8087e57
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,9 @@ public ResourceDTO getResourceRelationListForRelease(@PathParam("resourceGroupId
if (resource == null) {
return null;
}
List<String> uniqueNames = new ArrayList<>();
List<ResourceRelationDTO> resourceRelationDTOs = new ArrayList<>();
for (ConsumedResourceRelationEntity consumedResourceRelationEntity : resource.getConsumedMasterRelations()) {
if (!uniqueNames.contains(consumedResourceRelationEntity.getSlaveResource().getName())) {
uniqueNames.add(consumedResourceRelationEntity.getSlaveResource().getName());
resourceRelationDTOs.add(new ResourceRelationDTO(consumedResourceRelationEntity));
}
resourceRelationDTOs.add(new ResourceRelationDTO(consumedResourceRelationEntity));
}
return new ResourceDTO(resource, resourceRelationDTOs);
}
Expand Down

0 comments on commit 8087e57

Please sign in to comment.