fix: version 2.17.4 -- el avance del proyecto ignoraba que habia actividades eliminadas

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Milton Gonzalez
2026-10-20 15:47:17 -05:00
parent 0373810637
commit 9231bd2c7a
5 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ export async function removeMember(projectId, userId) {
}
export async function averageActivityProgress(projectId) {
const [rows] = await pool.query('SELECT AVG(progress_pct) AS avg_pct FROM activities WHERE project_id = ?', [
const [rows] = await pool.query('SELECT AVG(progress_pct) AS avg_pct FROM activities WHERE project_id = ? AND deleted_at IS NULL', [
projectId,
]);
return rows[0].avg_pct === null ? 0 : Number(rows[0].avg_pct);