diff --git a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/controller/IngestionController.java b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/controller/IngestionController.java index ef5b2956a..1c1dd1619 100644 --- a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/controller/IngestionController.java +++ b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/controller/IngestionController.java @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; -import reactor.core.scheduler.Schedulers; import static reactor.function.TupleUtils.function; diff --git a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/service/DataEntityServiceImpl.java b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/service/DataEntityServiceImpl.java index cd5163d0f..376c7b3fa 100644 --- a/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/service/DataEntityServiceImpl.java +++ b/odd-platform-api/src/main/java/org/opendatadiscovery/oddplatform/service/DataEntityServiceImpl.java @@ -484,9 +484,15 @@ public Mono listEntitiesWithinDEG(final String degOddrn) return reactiveDataEntityRepository.getDEGEntities(degOddrn) .map(entityList -> entityList .stream() - .map(de -> new CompactDataEntity() - .oddrn(de.getOddrn()) - .type(DataEntityType.fromValue(DataEntityTypeDto.findById(de.getTypeId()).toString()))) + .map(de -> { + final DataEntityTypeDto type = DataEntityTypeDto + .findById(de.getTypeId()) + .orElseThrow(); + + return new CompactDataEntity() + .oddrn(de.getOddrn()) + .type(DataEntityType.fromValue(type.toString())); + }) .toList()) .map(entityList -> new CompactDataEntityList().items(entityList)); }