Repository navigation
fix: fall back to TBA when a physical workshop has no host - #3064
Merged
Merged
Conversation
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_hostaction 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_eventcallsworkshop.host.nameand raisesNoMethodError.Change
WorkshopCalendarfalls back toTBAfor the host name and the address when the workshop has no host.Review notes
setup_eventandaddress, and whetherTBAis the right value to show for a hostless workshop.destroy_hostitself, so an organiser can still remove the host from a physical workshop. That is a separate change.