* testcaseModel: enclose the value in single quotes.

This commit is contained in:
liugang
2023-09-05 15:05:06 +08:00
parent b0da37fdef
commit 420acd4eed
+2 -2
View File
@@ -2210,7 +2210,7 @@ class testcaseModel extends model
$this->dao->insert(TABLE_SCENE)->data($scene)
->autoCheck()
->batchCheck($this->config->testcase->createscene->requiredFields, 'notempty')
->checkIF($product, 'title', 'unique', "product = {$product}")
->checkIF($product, 'title', 'unique', "product = '{$product}'")
->checkFlow()
->exec();
if(dao::isError()) return false;
@@ -2606,7 +2606,7 @@ class testcaseModel extends model
$this->dao->update(TABLE_SCENE)->data($scene)
->batchCheck($this->config->testcase->editscene->requiredFields, 'notempty')
->check('title', 'unique', "product = {$scene->product} AND id != {$sceneID}")
->check('title', 'unique', "product = '{$scene->product}' AND id != '{$sceneID}'")
->where('id')->eq($sceneID)
->checkFlow()
->exec();