Skip to content

Commit

Permalink
Fixed ObsGroup with no changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Oliveira committed Feb 19, 2024
1 parent 288b2e7 commit 09ce198
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,14 @@ export class ObsAdapterHelper {
nodeAsGroup?.initialValue?.groupMembers?.map((node) =>
this.getOldObsPayload(node)
) || [];

let isGroupChanged: boolean = false;
_.each(nodeAsGroup.children, (child) => {
const payload = this.getObsNodePayload(child);
if (payload.length > 0) {
isGroupChanged = true;
console.warn('payload', payload);
console.warn('isGroupChanged', isGroupChanged);
if (payload[0].voided) {
childrenPayload.find(
(obs) => obs.uuid == payload[0].uuid
Expand All @@ -507,7 +512,7 @@ export class ObsAdapterHelper {
}
});

if (childrenPayload.length === 0) {
if (!isGroupChanged) {
return null;
}

Expand Down

0 comments on commit 09ce198

Please sign in to comment.