From 8f6d1fad8935b18575245eaeaab1192f132de0e4 Mon Sep 17 00:00:00 2001 From: Alexandria Date: Thu, 19 May 2022 13:40:23 +0100 Subject: [PATCH] fix: our tests don't always link a calendar when creating an event --- app/models/event.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/event.rb b/app/models/event.rb index 654a277b7..c83c12c15 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -161,7 +161,7 @@ def set_address_from_place def require_location # 'event', 'no_location', and 'online_only' do not require a Location - return if %w[event no_location online_only].include?(calendar.strategy) + return if %w[event no_location online_only].include?(calendar&.strategy) # If we have an online address we don't need a physical one return if self.online_address_id.present?