From 39f31cfb111203b84519b4d16e5a3b891f0b4494 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sun, 6 Sep 2026 21:38:20 -0400 Subject: [PATCH] Fix redirect after appointment deletion and handle missing appointment gracefully --- app/controllers/customer_appointments_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/customer_appointments_controller.rb b/app/controllers/customer_appointments_controller.rb index 8c8aa88..cb9c064 100644 --- a/app/controllers/customer_appointments_controller.rb +++ b/app/controllers/customer_appointments_controller.rb @@ -86,7 +86,7 @@ class CustomerAppointmentsController < ApplicationController def destroy @appointment.destroy flash[:notice] = l(:notice_successful_delete) - redirect_to project_customer_appointments_path( @project) + redirect_to issues_calendar_path end private @@ -117,6 +117,8 @@ class CustomerAppointmentsController < ApplicationController def find_appointment @appointment = CustomerAppointment.find(params[:id]) + rescue + render_404 end def log(msg)