From dbe9142396997d92a41abd19d36b492bee50ef02 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 21 Nov 2022 17:39:28 +0000 Subject: [PATCH] update active_periods --- app/helpers/locations_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/locations_helper.rb b/app/helpers/locations_helper.rb index 4eaf841e5..ca04826ba 100644 --- a/app/helpers/locations_helper.rb +++ b/app/helpers/locations_helper.rb @@ -48,7 +48,7 @@ module LocationsHelper sorted_deactivation_periods = remove_nested_periods(location.location_deactivation_periods.sort_by(&:deactivation_date)) sorted_deactivation_periods.each do |deactivation| - periods.find { |period| period.to.nil? }.to = deactivation.deactivation_date + periods.last.to = deactivation.deactivation_date periods << ActivePeriod.new(deactivation.reactivation_date, nil) end