myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3554] trunk/app/controllers/workflows_controller


From: noreply
Subject: [myexperiment-hackers] [3554] trunk/app/controllers/workflows_controller.rb: Check to prevent 500 error when no workflow file selected
Date: Wed, 22 May 2013 09:16:02 +0000 (UTC)

Revision
3554
Author
fbacall
Date
2013-05-22 09:16:01 +0000 (Wed, 22 May 2013)

Log Message

Check to prevent 500 error when no workflow file selected

Modified Paths

Diff

Modified: trunk/app/controllers/workflows_controller.rb (3553 => 3554)


--- trunk/app/controllers/workflows_controller.rb	2013-05-21 13:07:41 UTC (rev 3553)
+++ trunk/app/controllers/workflows_controller.rb	2013-05-22 09:16:01 UTC (rev 3554)
@@ -840,7 +840,7 @@
     end
     
     # Check that a file has been selected 
-    if params[:workflow][:file].size == 0
+    if params[:workflow][:file].nil? || params[:workflow][:file].size == 0
       respond_to do |format|
         flash.now[:error] = "Please select a valid workflow file to upload. If you have selected a file, it might be empty."
         format.html { render :action ="" view_to_render_on_fail }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]