From ec47508fbd500ad3097dbbeaf6e49062e39262ac Mon Sep 17 00:00:00 2001 From: Sathish Date: Thu, 10 Mar 2022 19:18:27 +0530 Subject: [PATCH] execute lazy instance fields Signed-off-by: Sathish --- lib/inspec/utils/filter.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/inspec/utils/filter.rb b/lib/inspec/utils/filter.rb index 952e2ffa0..a730b6c77 100644 --- a/lib/inspec/utils/filter.rb +++ b/lib/inspec/utils/filter.rb @@ -492,7 +492,10 @@ module FilterTable result = where(nil) if custom_property_struct.opts[:lazy] result.populate_lazy_field(custom_property_struct.field_name, filter_criteria_value) + elsif custom_property_struct.opts[:lazy_instance] + result.populate_lazy_instance_field(custom_property_struct.field_name, filter_criteria_value) end + result = where(nil).get_column_values(custom_property_struct.field_name) # TODO: the where(nil). is likely unneeded result = result.flatten.uniq.compact if custom_property_struct.opts[:style] == :simple result