From 978cb3c9e7e2abe7317ccdd3c136631c7699b4e2 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 23 Nov 2022 16:25:44 +0000 Subject: [PATCH] fix: check for startdate presence --- app/models/location.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/location.rb b/app/models/location.rb index 9ca32ab85..46cb1da6c 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -380,7 +380,7 @@ class Location < ApplicationRecord return :deactivated if open_deactivation&.deactivation_date.present? && Time.zone.now >= open_deactivation.deactivation_date return :deactivating_soon if open_deactivation&.deactivation_date.present? && Time.zone.now < open_deactivation.deactivation_date return :reactivating_soon if recent_deactivation&.reactivation_date.present? && Time.zone.now < recent_deactivation.reactivation_date - return :activating_soon if Time.zone.now < startdate + return :activating_soon if startdate.present? && Time.zone.now < startdate :active end