Merge pull request '5808-client.credit-management' (!1640) from 5808-client.credit-management into dev
gitea/salix/pipeline/head There was a failure building this commit Details

Reviewed-on: #1640
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Vicent Llopis 2023-06-28 12:35:08 +00:00
commit a6fba97b7d
1 changed files with 2 additions and 2 deletions

View File

@ -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 = {};