diff --git a/services/service-workflow/main/default/routes/api_workflow_amis_chart.router.js b/services/service-workflow/main/default/routes/api_workflow_amis_chart.router.js index 234ffdc2ef..dd3566430b 100644 --- a/services/service-workflow/main/default/routes/api_workflow_amis_chart.router.js +++ b/services/service-workflow/main/default/routes/api_workflow_amis_chart.router.js @@ -186,9 +186,7 @@ router.get('/api/workflow/amis_chart', core.requireAuthentication, async functio '$project': { 'flow_version': 1, 'flow': 1, - 'lastTrace': { - '$last': '$traces' - } + 'lastTrace': { $arrayElemAt: ["$traces", -1] } } } ])