From 0dbd3abd65d0182779748e04a6fe0543549a6a71 Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 7 Jun 2023 15:06:37 +0200 Subject: [PATCH] refs #5808 fix: corregido el condicional --- modules/client/back/models/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/client/back/models/client.js b/modules/client/back/models/client.js index 7b577fa98..697129df0 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -14,7 +14,7 @@ module.exports = Self => { Self.validatesPresenceOf('street', { message: 'Street cannot be empty' }); - + Self.validatesPresenceOf('city', { message: 'City cannot be empty' }); @@ -282,7 +282,7 @@ module.exports = Self => { await Self.changeCredit(ctx, finalState, changes); // Credit management changes - if (orgData?.rating != changes.rating || orgData?.recommendedCredit != changes.recommendedCredit) + if (changes?.rating || changes?.recommendedCredit) await Self.changeCreditManagement(ctx, finalState, changes); const oldInstance = {};