RED-9097: fixed workflow file attributes not updating.

This commit is contained in:
Nicoleta Panaghiu 2024-05-08 13:34:38 +03:00
parent ecf20fbf1b
commit 54312abb6c

View File

@ -236,7 +236,11 @@ export class WorkflowComponent<T extends IListable, K extends string> extends Co
private _shouldUpdate(entity: T): boolean {
const existingEntity = this.all[entity.id]?.entity;
return existingEntity && this.config.itemVersionFn(entity) !== this.config.itemVersionFn(existingEntity);
return (
existingEntity &&
(this.config.itemVersionFn(entity) !== this.config.itemVersionFn(existingEntity) ||
JSON.stringify(entity) !== JSON.stringify(existingEntity))
);
}
private _shouldAdd(entity: T): boolean {