[PATCH conductor] revision of forgotten bugfix

jzigmund at redhat.com jzigmund at redhat.com
Tue Feb 7 17:30:21 UTC 2012


From: Jozef Zigmund <jzigmund at redhat.com>

---
 src/app/controllers/deployments_controller.rb |    5 +++++
 src/config/locales/en.yml                     |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index 1b94911..b858723 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -56,6 +56,11 @@ class DeploymentsController < ApplicationController
 
 
   def launch_time_params
+    unless params.has_key?(:deployable_id)
+      flash[:error] = t('deployments.flash.warning.deployable_not_selected')
+      redirect_to launch_new_deployments_path(:pool_id => params[:deployment][:pool_id]) and return
+    end
+
     @deployable = Deployable.find(params[:deployable_id])
     @deployment = Deployment.new(params[:deployment])
     @pool = @deployment.pool
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 7b809fb..90338c5 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -251,6 +251,7 @@ en:
       warning:
         disabled_pool: "Cannot launch a Deployment in this Pool. The pool has been disabled."
         failed_to_launch: "Deployment launch failed!"
+        deployable_not_selected: "You need to select deployable"
       error:
         not_launched: "Some assemblies will not be launched:"
         failed_to_launch_assemblies: "Failed to launch following assemblies:"
-- 
1.7.7.6




More information about the aeolus-devel mailing list