Fix project preview completed_tasks_24h should not count tasks that are marked as failed or running

This commit is contained in:
allegroai 2023-03-23 19:13:52 +02:00
parent 24bb87aaee
commit 30cfdac8f2

View File

@ -405,6 +405,18 @@ class ProjectBLL:
"$completed", "$completed",
{"$gt": ["$completed", time_thresh]}, {"$gt": ["$completed", time_thresh]},
additional_cond, additional_cond,
{
"$not": {
"$in": [
"$status",
[
TaskStatus.queued,
TaskStatus.in_progress,
TaskStatus.failed,
],
]
}
},
] ]
}, },
"then": 1, "then": 1,