diff --git a/app/models/location.rb b/app/models/location.rb index 60bab3629..55bf99fe7 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -118,7 +118,7 @@ class Location < ApplicationRecord .where.not(id: joins(scheme: [:owning_organisation]).merge(Location.deactivated_by_organisation).pluck(:id)) .where.not(id: incomplete.pluck(:id)) .where.not(id: activating_soon(date).pluck(:id)) - .where(scheme: Scheme.active) + .where(scheme: Scheme.active(date)) } scope :visible, -> { where(discarded_at: nil) }