diff --git a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue
index 80efadb5fb..48457f01cf 100644
--- a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue
+++ b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue
@@ -12,10 +12,10 @@
-
-
-
-
+
+
+
+
@@ -38,7 +38,7 @@
import MsApiReportExport from "./ApiReportExport";
import MsApiReportViewHeader from "./ApiReportViewHeader";
import {RequestFactory} from "../../definition/model/ApiTestModel";
- import {windowPrint} from "@/common/js/utils";
+ import {windowPrint, getCurrentProjectID} from "@/common/js/utils";
export default {
name: "MsApiReport",
@@ -166,16 +166,9 @@
this.$warning(this.$t('api_test.automation.report_name_info'));
return;
}
- if (!this.currentProjectId) {
- this.$warning(this.$t('api_test.select_project'));
- return;
- }
this.loading = true;
- this.report.projectId = this.currentProjectId;
- let url = "/api/scenario/report/add";
- if (this.infoDb === true) {
- url = "/api/scenario/report/update";
- }
+ this.report.projectId = getCurrentProjectID();
+ let url = "/api/scenario/report/update";
this.result = this.$post(url, this.report, response => {
this.$success(this.$t('commons.save_success'));
this.loading = false;