rubocop style fix

This commit is contained in:
Brenda Wallace
2019-11-24 10:17:55 +13:00
parent bd2b5c6448
commit a8a522d09e

View File

@@ -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