From e563ae47864c14279f148f3be1e73d8a78a8e879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 27 Jun 2022 14:23:43 +0800 Subject: [PATCH] * Modify case. --- api/v1/entries/bugs.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/v1/entries/bugs.php b/api/v1/entries/bugs.php index ee608e220d..c67a444682 100644 --- a/api/v1/entries/bugs.php +++ b/api/v1/entries/bugs.php @@ -87,11 +87,14 @@ class bugsEntry extends entry $this->batchSetPost($fields); $caseID = $this->request('case', 0); - if($caseID) $case = $this->loadModel('testcase')->getById($caseID); - if($case) + if($caseID) { - $this->setPost('case', $case->id); - $this->setPost('caseVersion', $case->version); + $case = $this->loadModel('testcase')->getById($caseID); + if($case) + { + $this->setPost('case', $case->id); + $this->setPost('caseVersion', $case->version); + } } $this->setPost('product', $productID);