diff --git a/app/models/concerns/predict_harvest.rb b/app/models/concerns/predict_harvest.rb index a552735b3..51224a2a6 100644 --- a/app/models/concerns/predict_harvest.rb +++ b/app/models/concerns/predict_harvest.rb @@ -57,7 +57,7 @@ module PredictHarvest def harvest_months Rails.cache.fetch("#{cache_key_with_version}/harvest_months", expires_in: 5.minutes) do neighbours_for_harvest_predictions.where.not(harvested_at: nil) - .group("extract(MONTH from harvested_at)") + .group("extract(MONTH from harvested_at)::int") .count end end