|
|
|
@ -1406,6 +1406,9 @@ exports.IotDevice1 = async (req, reply) => {
|
|
|
|
|
for (const tank of tanks) {
|
|
|
|
|
const { tankhardwareId, tankHeight } = tank;
|
|
|
|
|
|
|
|
|
|
if (tankHeight === null || tankHeight === undefined) {
|
|
|
|
|
continue; // Skip this iteration and move to the next tank
|
|
|
|
|
}
|
|
|
|
|
// Find the corresponding tank in tanksSchema
|
|
|
|
|
const existingTank = await Tank.findOne({ hardwareId, tankhardwareId });
|
|
|
|
|
|
|
|
|
|