From a8a522d09ea60ef905004062e2bdd6255077716f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 24 Nov 2019 10:17:55 +1300 Subject: [PATCH] rubocop style fix --- app/models/concerns/predict_harvest.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/concerns/predict_harvest.rb b/app/models/concerns/predict_harvest.rb index f5dbb1a7e..63b9885e3 100644 --- a/app/models/concerns/predict_harvest.rb +++ b/app/models/concerns/predict_harvest.rb @@ -67,8 +67,11 @@ module PredictHarvest return harvests if harvests.size.positive? # otherwise use nearby plantings - return Harvest.where(planting: nearby_same_crop.has_harvests) - .where.not(planting_id: nil) if location + if location + return Harvest.where(planting: nearby_same_crop.has_harvests) + .where.not(planting_id: nil) + end + [] end