Skip to content

Commit

Permalink
Fix duplicate services in included
Browse files Browse the repository at this point in the history
  • Loading branch information
Yavor16 committed Jan 21, 2025
1 parent 32aa0a8 commit 6618f1f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public List<DeployedMtaServiceKey> getMappedResources() {
}

public Map<String, CloudServiceInstance> getIncludedServiceInstancesMapping() {
List<Object> serviceInstances = getIncludedResources().getOrDefault("service_instances", Collections.emptyList());
List<Object> serviceInstances = getIncludedResources().getOrDefault("service_instances", Collections.emptyList())
.stream()
.distinct()
.toList();
return serviceInstances.stream()
.map(service -> (Map<String, Object>) service)
.collect(Collectors.toMap(service -> (String) service.get("guid"), resourceMapper::mapService));
Expand Down

0 comments on commit 6618f1f

Please sign in to comment.