aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/leap_cli/config/object_list.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/leap_cli/config/object_list.rb b/lib/leap_cli/config/object_list.rb
index 0c0da14..ebb0bb0 100644
--- a/lib/leap_cli/config/object_list.rb
+++ b/lib/leap_cli/config/object_list.rb
@@ -37,7 +37,12 @@ module LeapCli
key.each do |field, match_value|
field = field.is_a?(Symbol) ? field.to_s : field
match_value = match_value.is_a?(Symbol) ? match_value.to_s : match_value
- operator = match_value =~ /^!/ ? :not_equal : :equal
+ if match_value.is_a?(String) && match_value =~ /^!/
+ operator = :not_equal
+ match_value = match_value.sub(/^!/, '')
+ else
+ operator = :equal
+ end
each do |name, config|
value = config[field]
if value.is_a? Array