diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 661f9e9a..37dcdb74 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -384,16 +384,16 @@ exports.getTanklevels = async (req, reply) => { } // Summing up the total water levels and capacities - if (tank.tankLocation === 'sump' && tank.typeOfWater === 'Drinking Water') { + if (tank.tankLocation === 'sump' && tank.typeOfWater === 'drinking') { sumSumpDrinkingWater += waterlevel; sumSumpDrinkingWaterCapacity += capacity; - } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'Drinking Water') { + } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'drinking') { sumOverheadDrinkingWater += waterlevel; sumOverheadDrinkingWaterCapacity += capacity; - } else if (tank.tankLocation === 'sump' && tank.typeOfWater === 'Bore Water') { + } else if (tank.tankLocation === 'sump' && tank.typeOfWater === 'bore') { sumSumpBoreWater += waterlevel; sumSumpBoreWaterCapacity += capacity; - } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'Bore Water') { + } else if (tank.tankLocation === 'overhead' && tank.typeOfWater === 'bore') { sumOverheadBoreWater += waterlevel; sumOverheadBoreWaterCapacity += capacity; }