[PATCH] BZ857042 only validate pool_must_be_enabled on create
tzumainn at redhat.com
tzumainn at redhat.com
Wed Sep 19 13:23:03 UTC 2012
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
More information about the aeolus-devel
mailing list