diff --git a/backend/src/main/java/io/metersphere/api/parse/MsParser.java b/backend/src/main/java/io/metersphere/api/parse/MsParser.java index 5e768adbba..512965d760 100644 --- a/backend/src/main/java/io/metersphere/api/parse/MsParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/MsParser.java @@ -41,7 +41,9 @@ public class MsParser extends ApiImportAbstractParser { List data = apiDefinitionImport.getData(); data.forEach(apiDefinition -> { String id = UUID.randomUUID().toString(); -// apiDefinition.setModuleId(null); + if (StringUtils.isBlank(apiDefinition.getModulePath())) { + apiDefinition.setModuleId(null); + } parseModule(apiDefinition, importRequest.isSaved()); apiDefinition.setId(id); apiDefinition.setProjectId(this.projectId); diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index fd7e2ea3ab..73e221ba19 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -194,7 +194,7 @@ }, refresh() { this.list(); - this.$emit("refresh"); + this.$emit("refreshTable"); }, } }