-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
34a2c1b
commit 8f6cdb0
Showing
2 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters