Skip to content

Commit

Permalink
[webui] Catch missing parameter 'id' in RequestController#show
Browse files Browse the repository at this point in the history
  • Loading branch information
saschpe committed Apr 13, 2012
1 parent 402a4b9 commit 2b269d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/webui/app/controllers/request_controller.rb
Expand Up @@ -54,8 +54,9 @@ def modify_review
end

def show
redirect_back_or_to :controller => 'home', :action => 'requests' and return if !params[:id]
begin
@req = find_cached(BsRequest, params[:id]) if params[:id]
@req = find_cached(BsRequest, params[:id])
rescue ActiveXML::Transport::Error => e
flash[:error] = "Can't find request #{params[:id]}"
redirect_back_or_to :controller => "home", :action => "requests" and return
Expand Down

0 comments on commit 2b269d4

Please sign in to comment.