Fix redirect after appointment deletion and handle missing appointment gracefully

This commit is contained in:
ricky committed 2026-09-06 21:38:20 -04:00
1 parent df788d4d97
commit 39f31cfb11
1 file changed
+3 -1
@@ -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)