rubycentral / cfp-app

Rails app for managing a conference CFP
MIT License
224 stars 155 forks source link

Nullify a ProgramSession's TimeSlot #271

Closed maximumtiu closed 2 years ago

maximumtiu commented 2 years ago

Reason for Change

Recently, we had a speaker cancel their presentation, but the session had already been scheduled in the app.

In prod, I deleted the ProgramSession using the dedicated button in the UI to do so, but then got some errors when trying to view the schedule.

This was because there was still a TimeSlot referencing the deleted ProgramSession.

Changes

When deleting a ProgramSession, nullify the program_session_id on the related TimeSlot if applicable.

Also cleaned up some specs while I was in there.