Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quality_data: overview: Fix incorrect field summing passing grants
When calculating the overview stats for /api/dashboard/overview?mode=grants the logic of fail/pass was being used to count the total number of grants which passed by just using the total number of grants that are in the source file. This is only correct some of the time because it just so happens that if a publisher is likely to be missing a field (such as company number) then they will miss it out of all of their datasets so the calculation is coincidentally correct. Some publishers however do add such fields for _some_ of their grants which makes this calculation completely incorrect for certain metrics. This change makes sure we use the total count from the DQT (library) rather than the aggregated data. Updates basic test data to corrected value. Fixes: #246
- Loading branch information