@strapi/review-workflows 5.0.0-rc.19 → 5.0.0-rc.20
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/server/index.mjs
CHANGED
|
@@ -8127,12 +8127,13 @@ const stages = {
|
|
|
8127
8127
|
}
|
|
8128
8128
|
const entityStageId = entity[ENTITY_STAGE_ATTRIBUTE]?.id;
|
|
8129
8129
|
const canTransition = stagePermissions2.can(STAGE_TRANSITION_UID, entityStageId);
|
|
8130
|
-
const [workflowCount,
|
|
8130
|
+
const [workflowCount, workflowResult] = await Promise.all([
|
|
8131
8131
|
workflowService.count(),
|
|
8132
8132
|
workflowService.getAssignedWorkflow(modelUID, {
|
|
8133
8133
|
populate: "stages"
|
|
8134
8134
|
})
|
|
8135
8135
|
]);
|
|
8136
|
+
const workflowStages = workflowResult ? workflowResult.stages : [];
|
|
8136
8137
|
const meta = {
|
|
8137
8138
|
stageCount: workflowStages.length,
|
|
8138
8139
|
workflowCount
|