Use the correct adjustmentOption for auto rain delay

This commit is contained in:
Samer Albahra
2015-07-30 22:30:48 -07:00
parent 58bc020f34
commit a8827dbb96

View File

@@ -348,7 +348,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( "r" ) ) ? adjustmentOptions.r : 1440; rainDelay = ( adjustmentOptions && adjustmentOptions.hasOwnProperty( "d" ) ) ? adjustmentOptions.d : 1440;
} 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)