From 55b53c86c436ca42f76a34c045dc9f961303106a Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 18 Sep 2023 07:38:30 +0200 Subject: [PATCH] refs #6213 formatfix --- modules/supplier/back/models/supplier.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/supplier/back/models/supplier.js b/modules/supplier/back/models/supplier.js index 273c8c816..5cf357c13 100644 --- a/modules/supplier/back/models/supplier.js +++ b/modules/supplier/back/models/supplier.js @@ -123,8 +123,7 @@ module.exports = Self => { const {Supplier} = Self.app.models; const supplier = await Supplier.findById(id, null, ctx.options); - if (supplier) - await supplier.updateAttribute('account', Number(supplier.account) + id, ctx.options); + await supplier?.updateAttribute('account', Number(supplier.account) + id, ctx.options); } });