Signed-off-by: Loiseleur Michel <[email protected]>
---
app/models/smart_pool.rb | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/app/models/smart_pool.rb b/app/models/smart_pool.rb
index 1f718a8..9afc354 100644
--- a/app/models/smart_pool.rb
+++ b/app/models/smart_pool.rb
@@ -62,18 +62,16 @@ class SmartPool < Pool
if nested_pools
nested_pools.each do |pool_element|
pool = pool_element[:obj]
- if pool.hasChildren
+ if pool.hasChildren and pool_element.has_key?(:children)
if pool.name == user
pool_element[:children].each do |child_element|
child_pool = child_element[:obj]
user_pools <<[child_pool.name, child_pool.id]
end
else
- if pool_element.has_key?(:children)
- pool_element[:children].each do |child_element|
- child_pool = child_element[:obj]
- other_pools << [pool.name + " > " + child_pool.name,
child_pool.id]
- end
+ pool_element[:children].each do |child_element|
+ child_pool = child_element[:obj]
+ other_pools << [pool.name + " > " + child_pool.name,
child_pool.id]
end
end
end
--
1.6.2.5
_______________________________________________
Ovirt-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ovirt-devel