Merge pull request #50 from Derpthemeus/fix-weather-restrictions

Fix weather restrictions check
This commit is contained in:
Samer Albahra
2019-05-27 01:59:15 -05:00
committed by GitHub

View File

@@ -253,7 +253,7 @@ export const getWateringData = async function( req: express.Request, res: expres
// Continue with the weather request
let timeData: TimeData = getTimeData( coordinates );
let wateringData: WateringData;
if ( adjustmentMethod !== ADJUSTMENT_METHOD.MANUAL ) {
if ( adjustmentMethod !== ADJUSTMENT_METHOD.MANUAL || checkRestrictions ) {
if ( !weatherProvider.getWateringData ) {
res.send( "Error: selected WeatherProvider does not support getWateringData" );
return;