[PATCH] BZ858234 check if deployable is nil before trying to generate deployment xml

Matt Wagner matt.wagner at redhat.com
Tue Sep 18 17:37:54 UTC 2012


On Tue, Sep 18, 2012 at 01:05:00PM -0400, tzumainn at redhat.com wrote:
> From: Tzu-Mainn Chen <tzumainn at redhat.com>
> 
> ---
>  src/app/controllers/deployments_controller.rb |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
> index 51348a7..ce80df2 100644
> --- a/src/app/controllers/deployments_controller.rb
> +++ b/src/app/controllers/deployments_controller.rb
> @@ -65,6 +65,11 @@ class DeploymentsController < ApplicationController
>      @pool = @deployment.pool
>      init_new_deployment_attrs
>  
> +    if @deployable.nil?
> +      @deployment.errors.add(:base, t('deployments.flash.warning.deployable_not_selected'))
> +      render :launch_new and return
> +    end
> +
>      @deployment.deployable_xml = DeployableXML.new(@deployable.xml)
>      @deployment.owner = current_user
>  
> -- 
> 1.7.6.5

ACK.

I pushed this to master.

The flag on the BZ is still 1.1.0?, not +, so I did _not_ cherry-pick
this onto 1.1 -- only master.

-- Matt



More information about the aeolus-devel mailing list