diff --git a/app/models/concerns/predict_harvest.rb b/app/models/concerns/predict_harvest.rb index 63b9885e3..a5a0956a1 100644 --- a/app/models/concerns/predict_harvest.rb +++ b/app/models/concerns/predict_harvest.rb @@ -72,7 +72,7 @@ module PredictHarvest .where.not(planting_id: nil) end - [] + Harvest.none end private diff --git a/app/models/planting.rb b/app/models/planting.rb index bb29758ce..5539b6268 100644 --- a/app/models/planting.rb +++ b/app/models/planting.rb @@ -104,7 +104,7 @@ class Planting < ApplicationRecord end def nearby_same_crop - return if location.empty? + return Planting.none if location.blank? # latitude, longitude = Geocoder.coordinates(location, params: { limit: 1 }) Planting.joins(:garden)