From 2f1338c7bbd513cbaa150f5c577bb785a6d4371c Mon Sep 17 00:00:00 2001 From: d-m-u Date: Wed, 24 Oct 2018 13:29:50 -0400 Subject: [PATCH] Should take integer regardless of case... --- lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb index 5ae14d506..984f7131e 100644 --- a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb +++ b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb @@ -559,7 +559,7 @@ def self.convert_value_based_on_datatype(value, datatype) return false if datatype == 'FalseClass' return Time.parse(value) if datatype == 'time' || datatype == 'Time' return value.to_sym if datatype == 'symbol' || datatype == 'Symbol' - return value.to_i if datatype == 'integer' || datatype == 'Fixnum' + return value.to_i if %w(integer Integer Fixnum).include?(datatype) return value.to_f if datatype == 'float' || datatype == 'Float' return value.gsub(/[\[\]]/, '').strip.split(/\s*,\s*/) if datatype == 'array' && value.class == String return decrypt_password(value) if datatype == 'password'