* Optimize update unit test for block.

This commit is contained in:
孔令茂
2023-04-27 16:51:08 +08:00
parent 18127fba3e
commit 899e69aa3f
4 changed files with 93 additions and 3 deletions
+2 -2
View File
@@ -338,12 +338,12 @@ class blockModel extends model
*/
public function update(object $formData): int|false
{
$this->dao->update(TABLE_BLOCK)->data($formData)->exec();
$this->dao->update(TABLE_BLOCK)->data($formData)->autoCheck()->exec();
if(dao::isError()) return false;
$this->loadModel('score')->create('block', 'set');
return $formData->id;
return (int)$formData->id;
}
/**