From 8361c9965e25629f494267c658c9ec26087b6780 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Wed, 15 Mar 2023 16:29:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=209322=20=E6=A3=80=E6=9F=A5=E9=A1=B9?= =?UTF-8?q?=E8=AE=BE=E5=AE=9A-=E9=A1=B5=E9=9D=A2=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/patrolManage/checkItems.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/app/lib/controllers/patrolManage/checkItems.js b/api/app/lib/controllers/patrolManage/checkItems.js index 738987c..a61aa33 100644 --- a/api/app/lib/controllers/patrolManage/checkItems.js +++ b/api/app/lib/controllers/patrolManage/checkItems.js @@ -52,7 +52,8 @@ async function getCheckItems(ctx, next) { attributes: ['id', 'name'], }, { model: models.PatrolTemplate - }] + }], + distinct: true, } if (name) { options.where.name = { $like: `%${name}%` };