From 0caa6c3fd4e7e90bc4e839a813dac7ee0fea7cf7 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Wed, 26 Jun 2024 08:50:47 +0800 Subject: [PATCH] * [task#121512] Add the skip fields and change type hint. --- module/instance/model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/instance/model.php b/module/instance/model.php index 0c11569366..413d04cfb8 100644 --- a/module/instance/model.php +++ b/module/instance/model.php @@ -331,15 +331,16 @@ class instanceModel extends model * @param int $id * @param object|array $newInstance * @access public - * @return void + * @return int */ public function updateByID(int $id, object|array $newInstance) { - return $this->dao->update(TABLE_INSTANCE)->data($newInstance) + return $this->dao->update(TABLE_INSTANCE)->data($newInstance, 'memory_kb,cpu') ->autoCheck() ->checkIF(isset($newInstance->name), 'name', 'notempty') ->checkIF(isset($newInstance->status), 'status', 'in', array_keys($this->lang->instance->statusList)) - ->where('id')->eq($id)->exec(); + ->where('id')->eq($id) + ->exec(); } /**