summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-15 15:39:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-15 15:39:36 +0000
commit712e5be29f9afccfa353d315fc6b664bdcdf8057 (patch)
treed972fef7e417b91557f28e2a91df593623900cb2 /app
parent5097f5178418df8525ff8ecc422c069efb31a795 (diff)
downloadredmine-712e5be29f9afccfa353d315fc6b664bdcdf8057.tar.gz
redmine-712e5be29f9afccfa353d315fc6b664bdcdf8057.zip
Find role and tracker only when param is present.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9994 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/workflows_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb
index 1d83342b5..727bde68f 100644
--- a/app/controllers/workflows_controller.rb
+++ b/app/controllers/workflows_controller.rb
@@ -25,8 +25,8 @@ class WorkflowsController < ApplicationController
end
def edit
- @role = Role.find_by_id(params[:role_id])
- @tracker = Tracker.find_by_id(params[:tracker_id])
+ @role = Role.find_by_id(params[:role_id]) if params[:role_id]
+ @tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
if request.post?
WorkflowTransition.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
@@ -59,8 +59,8 @@ class WorkflowsController < ApplicationController
end
def permissions
- @role = Role.find_by_id(params[:role_id])
- @tracker = Tracker.find_by_id(params[:tracker_id])
+ @role = Role.find_by_id(params[:role_id]) if params[:role_id]
+ @tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
if @role && @tracker
if request.post?