This patch fixes the error when launching Deployable without any HW
profile selected
Show replies by date
From: Jiri Tomasek <jtomasek(a)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 b75b49d..fb6e5e0 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -120,7 +120,7 @@ class Deployment < ActiveRecord::Base
:assembly => assembly,
:state => Instance::STATE_NEW,
:owner => user,
- :hardware_profile => HardwareProfile.find(hw_profiles[assembly.id.to_s])
+ :hardware_profile => hw_profiles ?
HardwareProfile.find(hw_profiles[assembly.id.to_s]) : nil
)
task = InstanceTask.create!({:user => user,
:task_target => instance,
--
1.7.4.2