diff --git a/mock-database/src/_mockDatabase.ts b/mock-database/src/_mockDatabase.ts index 061be651..c5f28c1c 100644 --- a/mock-database/src/_mockDatabase.ts +++ b/mock-database/src/_mockDatabase.ts @@ -177,8 +177,9 @@ export async function whenUploadQueueAdded(record: GradeDistributionCSVRow) { * - AVG of 0 (sus) * - totalEnrolled of 0 */ + //(record.AVG_GPA !== null) // TODO: use `GDR.safeToIncludeGPA(record)` - if (record.AVG_GPA !== null) { + if (GDR.safeToIncludeGPA(record) && record.AVG_GPA !== null) { // include in GPA GPA.include(courseData.GPA, record.AVG_GPA); @@ -237,7 +238,7 @@ export async function whenUploadQueueAdded(record: GradeDistributionCSVRow) { if (instructorExists) { // check if record has missing AVG // TODO: use `GDR.safeToIncludeGPA(record)` - if (record.AVG_GPA !== null) { + if (GDR.safeToIncludeGPA(record) && record.AVG_GPA !== null) { // include in GPA GPA.include(instructorData.GPA, record.AVG_GPA);