Skip to content

Commit

Permalink
Merge pull request #640 from /issues/626
Browse files Browse the repository at this point in the history
return all consumed relations on /resourceGroups/{resourceGroupId}/releases/{releaseId}
  • Loading branch information
yvespp authored Jan 27, 2022
2 parents 1bf18f9 + 8087e57 commit 41527e1
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 41527e1

Please sign in to comment.