From 71d71a58b48cdb5faa5ca1c22a51b46d051a770d Mon Sep 17 00:00:00 2001 From: windy Date: Wed, 3 Jan 2024 18:24:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=97=B6=20unique=20=E9=AA=8C=E8=AF=81=E9=97=AE=E9=A2=98=20(#3?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/library/traits/Backend.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/admin/library/traits/Backend.php b/app/admin/library/traits/Backend.php index 4b25677a..492b61b2 100644 --- a/app/admin/library/traits/Backend.php +++ b/app/admin/library/traits/Backend.php @@ -134,6 +134,8 @@ trait Backend if (class_exists($validate)) { $validate = new $validate; if ($this->modelSceneValidate) $validate->scene('edit'); + $pk = $this->model->getPk(); + $data[$pk] = $row[$pk]; $validate->check($data); } }