rez_core 5.0.176 → 5.0.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/meta/service/entity-table.service.js +1 -1
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +3 -3
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/service/entity-table.service.ts +1 -1
- package/src/module/workflow-automation/service/workflow-automation.service.ts +11 -5
package/package.json
CHANGED
|
@@ -214,9 +214,10 @@ export class WorkflowAutomationService extends EntityServiceImpl {
|
|
|
214
214
|
where: { workflow_automation_id: workflow.id },
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
const existingMap = new Map(
|
|
218
|
-
|
|
219
|
-
);
|
|
217
|
+
// const existingMap = new Map(
|
|
218
|
+
// existingActions.map((a) => [a.action_category_id, a]),
|
|
219
|
+
// );
|
|
220
|
+
const existingMap = new Map(existingActions.map((a) => [a.id, a]));
|
|
220
221
|
|
|
221
222
|
// 2. Upsert actions
|
|
222
223
|
for (const a of action) {
|
|
@@ -260,9 +261,14 @@ export class WorkflowAutomationService extends EntityServiceImpl {
|
|
|
260
261
|
this.logger.log(`Created new action: ${a.actionCategory}`);
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
|
-
const incomingCategories = action.map((a) => a.actionCategory);
|
|
264
|
+
// const incomingCategories = action.map((a) => a.actionCategory);
|
|
265
|
+
// const toDelete = existingActions.filter(
|
|
266
|
+
// (a) => !incomingCategories.includes(a.action_category_id),
|
|
267
|
+
// );
|
|
268
|
+
|
|
269
|
+
const incomingIds = action.map((a) => a.id).filter((id) => id);
|
|
264
270
|
const toDelete = existingActions.filter(
|
|
265
|
-
(a) => !
|
|
271
|
+
(a) => !incomingIds.includes(a.id),
|
|
266
272
|
);
|
|
267
273
|
|
|
268
274
|
if (toDelete.length) {
|