From baaee679c0e6eea01fdf858ee9f99b471f3d6420 Mon Sep 17 00:00:00 2001 From: daitingting Date: Mon, 26 Jun 2023 01:44:21 +0000 Subject: [PATCH] * Adjust the result for ajax submit. --- module/testcase/control.php | 2 ++ module/testcase/model.php | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 05aac0c620..e0614a1026 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1228,6 +1228,8 @@ class testcase extends control { if($_POST) { + if($this->post->result == false) return $this->send(array('result' => 'fail', 'message' => $this->lang->testcase->mustChooseResult)); + $changes = $this->testcase->review($caseID); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); diff --git a/module/testcase/model.php b/module/testcase/model.php index 2b6bec8690..9cc34d90ed 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -951,8 +951,6 @@ class testcaseModel extends model */ public function review($caseID) { - if($this->post->result == false) return print(js::alert($this->lang->testcase->mustChooseResult)); - $oldCase = $this->getById($caseID); $now = helper::now();