Fix default value for users with Auto Rain Delay method

This commit is contained in:
Samer Albahra
2015-11-25 03:22:26 -06:00
parent 3f9f3df53b
commit b5b4ab3115

View File

@@ -415,7 +415,7 @@ exports.getWeather = function( req, res ) {
// If it is raining and the user has weather-based rain delay as the adjustment method then apply the specified delay // If it is raining and the user has weather-based rain delay as the adjustment method then apply the specified delay
if ( adjustmentMethod === 2 ) { if ( adjustmentMethod === 2 ) {
rainDelay = ( adjustmentOptions && adjustmentOptions.hasOwnProperty( "d" ) ) ? adjustmentOptions.d : 1440; rainDelay = ( adjustmentOptions && adjustmentOptions.hasOwnProperty( "d" ) ) ? adjustmentOptions.d : 24;
} else { } else {
// For any other adjustment method, apply a scale of 0 (as the scale will revert when the rain stops) // For any other adjustment method, apply a scale of 0 (as the scale will revert when the rain stops)