[CORD-1858] Avoid event duplication and skipping notification for parent models
Change-Id: I8815de31b0adb731226ae26bedbe3598bde04aca
(cherry picked from commit 31daa80018ef5014691dd49d9ad71f8c5638d416)
diff --git a/src/app/datasources/stores/synchronizer.store.ts b/src/app/datasources/stores/synchronizer.store.ts
index 635e6db..e1b26b3 100644
--- a/src/app/datasources/stores/synchronizer.store.ts
+++ b/src/app/datasources/stores/synchronizer.store.ts
@@ -36,7 +36,7 @@
if (!e.msg || !e.msg.changed_fields) {
return false;
}
- return e.msg.changed_fields.indexOf('backend_status') > -1;
+ return (e.msg.changed_fields.indexOf('backend_status') > -1 || e.msg.changed_fields.indexOf('backend_code') > -1) && !e.skip_notification;
})
.subscribe(
(event: IWSEvent) => {