Skip to content

Commit

Permalink
fix: statusCounts on score equal to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Apr 26, 2024
1 parent 1ce126b commit df08b46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if (node.status && node.assessable) {
statusCounts[node.status] = (statusCounts[node.status] || 0) + 1;
}
if (node.score && node.assessable && node.status !== 'not_applicable') {
if (node.is_scored && node.assessable && node.status !== 'not_applicable') {
statusCounts['scored'] = (statusCounts['scored'] || 0) + 1;
statusCounts['total_score'] = (statusCounts['total_score'] || 0) + node.score;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export interface Node {
children?: Record<string, Node>;
status?: string; // Assuming that the status field exists in nodes similar to leaves
score?: number; // Assuming that the score field exists in nodes similar to leaves
is_scored?: boolean; // Assuming that the is_scored field exists in nodes similar to leaves
}

0 comments on commit df08b46

Please sign in to comment.