mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Fix redirect after appointment deletion and handle missing appointment gracefully
This commit is contained in:
1 parent
df788d4d97
commit
39f31cfb11
1 file changed
+3
-1
@@ -86,7 +86,7 @@ class CustomerAppointmentsController < ApplicationController
|
|||||||
def destroy
|
def destroy
|
||||||
@appointment.destroy
|
@appointment.destroy
|
||||||
flash[:notice] = l(:notice_successful_delete)
|
flash[:notice] = l(:notice_successful_delete)
|
||||||
redirect_to project_customer_appointments_path( @project)
|
redirect_to issues_calendar_path
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
@@ -117,6 +117,8 @@ class CustomerAppointmentsController < ApplicationController
|
|||||||
|
|
||||||
def find_appointment
|
def find_appointment
|
||||||
@appointment = CustomerAppointment.find(params[:id])
|
@appointment = CustomerAppointment.find(params[:id])
|
||||||
|
rescue
|
||||||
|
render_404
|
||||||
end
|
end
|
||||||
|
|
||||||
def log(msg)
|
def log(msg)
|
||||||
|
|||||||
Reference in new issue
Block a user