Skip to content

Commit

Permalink
only check length for pages criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
bellangerq committed Nov 7, 2024
1 parent d18e4a7 commit 5367a14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions confiture-rest-api/src/audits/audit.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1424,8 +1424,9 @@ export class AuditService {
const statementIsPublished = !!a.initiator;

const auditIsComplete =
results.length ===
CRITERIA_BY_AUDIT_TYPE[a.auditType].length * (a.pages.length + 1) &&
results.filter((r) => r.pageId !== a.transverseElementsPageId)
.length ===
CRITERIA_BY_AUDIT_TYPE[a.auditType].length * a.pages.length &&
results
.filter((r) => r.pageId !== a.transverseElementsPageId)
.every((r) => r.status !== "NOT_TESTED");
Expand Down

0 comments on commit 5367a14

Please sign in to comment.