entity deleltion should not trigger ENTITY_CHANGED event, it should be separate event

This commit is contained in:
azivner 2018-08-28 23:17:56 +02:00
parent b009bcb6a0
commit 3bb021fba1

View File

@ -95,10 +95,13 @@ async function updateEntity(entity) {
}); });
} }
await eventService.emit(eventService.ENTITY_CHANGED, { // it seems to be better to handle deletion with a separate event
entityName, if (!entity.isDeleted) {
entity await eventService.emit(eventService.ENTITY_CHANGED, {
}); entityName,
entity
});
}
} }
}); });
} }