Skip to content

Commit

Permalink
Merge pull request #823 from FreeAndFair/update-disc-display
Browse files Browse the repository at this point in the history
Update discrepancy, disagreement parsing
  • Loading branch information
ranweiler authored Oct 9, 2017
2 parents b32dd1c + 23fc071 commit aaa0a93
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions client/src/adapter/dosDashboardRefresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@ function parseDisagreementCount(data: any): number {
return null;
}

return _.sum(_.values(data));
return data.AUDITED_CONTEST;
}

function parseDiscrepancyCounts(data: any): any {
if (_.isEmpty(data)) {
return null;
}

const total = _.sum(_.values(data));
const opportunistic = data.OPPORTUNISTIC_BENEFITS || 0;
const tied = data.TIED_CONTEST || 0;
const unaudited = opportunistic + tied;
const audited = total - unaudited;
const audited = data.AUDITED_CONTEST;
const unaudited = data.UNAUDITED_CONTEST;

return { audited, unaudited };
}
Expand Down

0 comments on commit aaa0a93

Please sign in to comment.