Skip to content

fix: fall back to TBA when a physical workshop has no host - #3064

Merged
mroderick merged 2 commits into
masterfrom
fix/workshop-calendar-nil-host
Oct 30, 2026
Merged

mroderick merged 2 commits into
masterfrom
fix/workshop-calendar-nil-host

Conversation

@mroderick

Copy link
Copy Markdown
Collaborator

Restores the nil-host guard that #3060 reverted, this time with the spec coverage it was missing.

Problem

A physical workshop can sit in the database with no host: the admin destroy_host action removes the host without a check, and the host validation on create/update does not cover it. When an invitation email is then sent, WorkshopCalendar#setup_event calls workshop.host.name and raises NoMethodError.

Change

  • WorkshopCalendar falls back to TBA for the host name and the address when the workshop has no host.
  • A spec covers the hostless physical workshop; without the guard it fails with the error above.

Review notes

The calendar serializer raised NoMethodError for a physical workshop
without a host. The admin destroy_host action can produce one: it
updates WorkshopSponsor, so the Workshop validation from #3059 does
not run. Guard the host name and address and pin the behaviour with
a spec.
@mroderick
mroderick marked this pull request as ready for review October 30, 2026 06:27
Covers the review finding on PR #3064: the address fallback also
applies when a host exists but its address record is gone, a state
the nil-host example never reached. Asserts the iCalendar output
carries the fallback end to end, and the organizer and description
for the hostless case.

All three examples fail against the pre-guard serializer.
@mroderick
mroderick merged commit 560b9e6 into master Oct 30, 2026
12 checks passed
@mroderick
mroderick deleted the fix/workshop-calendar-nil-host branch October 30, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant