diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1033e9f26..b6b1ddaad 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,6 +32,11 @@ jobs: - name: Check space before tests run: df -h # debug step + - name: Install Docker Compose 1.29.2-1 + run: | + curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + docker-compose --version # - name: Setup upterm session # uses: lhotari/action-upterm@v1 # with: diff --git a/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java b/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java index 951209f04..395d12110 100644 --- a/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java +++ b/java/registry/src/main/java/dev/sunbirdrc/registry/helper/RegistryHelper.java @@ -370,7 +370,9 @@ private JsonNode searchEntity(JsonNode inputJson, ISearchService service, String ViewTemplate viewTemplate = viewTemplateManager.getViewTemplate(inputJson); if (viewTemplate != null) { ViewTransformer vTransformer = new ViewTransformer(); - resultNode.set(ENTITY_LIST, vTransformer.transform(viewTemplate, resultNode.get(ENTITY_LIST))); + String entityName = resultNode.fields().next().getKey(); + ObjectNode transformerInput = JsonNodeFactory.instance.objectNode().set(entityName, resultNode.get(entityName).get(ENTITY_LIST)); + ((ObjectNode) resultNode.get(entityName)).set(ENTITY_LIST, vTransformer.transform(viewTemplate, transformerInput).get(entityName)); } // Search is tricky to support LD. Needs a revisit here. logger.debug("searchEntity ends");