diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/ApiDefinitionImportUtil.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/ApiDefinitionImportUtil.java index b6ccfc2d6b..4452c4bfd6 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/ApiDefinitionImportUtil.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/ApiDefinitionImportUtil.java @@ -61,6 +61,7 @@ public class ApiDefinitionImportUtil { if (parentModule != null) { module = apiModuleService.getNewModule(name, projectId, parentModule.getLevel() + 1); module.setParentId(parentModule.getId()); + module.setProtocol(parentModule.getProtocol()); } else { module = apiModuleService.getNewModule(name, projectId, 1); } @@ -121,6 +122,7 @@ public class ApiDefinitionImportUtil { if (parentModule != null) { module = apiModuleService.getNewModule(name, projectId, parentModule.getLevel() + 1); module.setParentId(parentModule.getId()); + module.setProtocol(parentModule.getProtocol()); } else { module = apiModuleService.getNewModule(name, projectId, 1); }