##// END OF EJS Templates
Find role and tracker only when param is present....
Jean-Philippe Lang -
r9811:712e5be29f9a
parent child
Show More
@@ -25,8 +25,8 class WorkflowsController < ApplicationController
25 25 end
26 26
27 27 def edit
28 @role = Role.find_by_id(params[:role_id])
29 @tracker = Tracker.find_by_id(params[:tracker_id])
28 @role = Role.find_by_id(params[:role_id]) if params[:role_id]
29 @tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
30 30
31 31 if request.post?
32 32 WorkflowTransition.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
@@ -59,8 +59,8 class WorkflowsController < ApplicationController
59 59 end
60 60
61 61 def permissions
62 @role = Role.find_by_id(params[:role_id])
63 @tracker = Tracker.find_by_id(params[:tracker_id])
62 @role = Role.find_by_id(params[:role_id]) if params[:role_id]
63 @tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
64 64
65 65 if @role && @tracker
66 66 if request.post?
General Comments 0
You need to be logged in to leave comments. Login now