From f7cb7036f9920d9225d2f4f9abfae86e127f2338 Mon Sep 17 00:00:00 2001 From: David M <207745043+davidmillen50@users.noreply.github.com> Date: Mon, 26 Oct 2026 14:12:58 +0000 Subject: [PATCH] Fix workshop serializer when host is nil and rubocop newline --- Gemfile.lock | 1 + app/serializers/workshop_calendar.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7a3e18ffd..6109e95e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -625,6 +625,7 @@ PLATFORMS arm64-darwin-23 arm64-darwin-25 x86_64-darwin-24 + x86_64-darwin-25 x86_64-linux DEPENDENCIES diff --git a/app/serializers/workshop_calendar.rb b/app/serializers/workshop_calendar.rb index 196a9e68f..955a21c06 100644 --- a/app/serializers/workshop_calendar.rb +++ b/app/serializers/workshop_calendar.rb @@ -25,7 +25,7 @@ def calendar def setup_event calendar.event do |e| - configure(e, host_name: workshop.host.name) + configure(e, host_name: workshop.host&.name || 'TBA') e.location = address(workshop) e.description = I18n.t('workshop.calendar.description', invitation_link: invitation_url) @@ -55,7 +55,7 @@ def configure(event, host_name:) end def address(workshop) - AddressPresenter.new(workshop.host.address).to_s + workshop.host&.address ? AddressPresenter.new(workshop.host.address).to_s : 'TBA' end def start_and_end_time(event)