From a0cdd4f5256cfc322b428418c2b00659b1634f6a Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 26 Mar 2014 19:00:18 +0100 Subject: [PATCH] Fix bug listing specific objects in one_helper --- src/cli/one_helper.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index 22a34264a2..27bca4ed37 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -482,9 +482,10 @@ EOT array=pool.get_hash return -1, array.message if OpenNebula.is_error?(array) - if options[:ids] - rname=self.class.rname - array["#{rname}_POOL"][rname].reject! do |element| + rname=self.class.rname + elements=array["#{rname}_POOL"][rname] + if options[:ids] && elements + elements.reject! do |element| !options[:ids].include?(element['ID'].to_i) end end