[PATCH] BZ857042 only validate pool_must_be_enabled on create

Matt Wagner matt.wagner at redhat.com
Wed Sep 19 14:03:20 UTC 2012


On Wed, Sep 19, 2012 at 09:23:03AM -0400, tzumainn at redhat.com wrote:
> From: Tzu-Mainn Chen <tzumainn at redhat.com>
> 
> ---
>  src/app/models/deployment.rb |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
> index 8d42b9f..e612ab1 100644
> --- a/src/app/models/deployment.rb
> +++ b/src/app/models/deployment.rb
> @@ -77,7 +77,7 @@ class Deployment < ActiveRecord::Base
>    validates_uniqueness_of :name, :scope => [:pool_id, :deleted_at]
>    validates_length_of :name, :maximum => 50
>    validates_presence_of :owner_id
> -  validate :pool_must_be_enabled
> +  validate :pool_must_be_enabled, :on => :create
>    before_destroy :destroy_deployment_config
>    before_create :inject_launch_parameters
>    before_create :generate_uuid
> -- 
> 1.7.6.5

ACK, pushing now.



More information about the aeolus-devel mailing list