Skip to content
This repository
Browse code

[webui] Catch missing parameter 'id' in RequestController#show

  • Loading branch information...
commit 4475b34713abf1478c6789c8fa73caeaf354446c 1 parent 66bf7fd
Sascha Peilicke authored
3  src/webui/app/controllers/request_controller.rb
@@ -54,8 +54,9 @@ def modify_review
54 54
   end
55 55
 
56 56
   def show
  57
+    redirect_back_or_to :controller => 'home', :action => 'requests' and return if !params[:id]
57 58
     begin
58  
-      @req = find_cached(BsRequest, params[:id]) if params[:id]
  59
+      @req = find_cached(BsRequest, params[:id])
59 60
     rescue ActiveXML::Transport::Error => e
60 61
       flash[:error] = "Can't find request #{params[:id]}"
61 62
       redirect_back_or_to :controller => "home", :action => "requests" and return

0 notes on commit 4475b34

Please sign in to comment.
Something went wrong with that request. Please try again.