From cf4beb76190bd858abcb63b3a70cb232373e0bd7 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 21 May 2018 15:52:39 +1000 Subject: [PATCH] Bugfix: fix error arising from restructure --- lib/builder.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/builder.rb b/lib/builder.rb index f37b999e..9ec04de0 100644 --- a/lib/builder.rb +++ b/lib/builder.rb @@ -188,12 +188,10 @@ class CustomWizard::Builder if field_template['choices_filters'] && field_template['choices_filters'].length > 0 field_template['choices_filters'].each do |f| objects.reject! do |o| - prop = field_template['key'] - - if prop.include? 'custom_fields' - o.custom_fields[prop.split('.')[1]].to_s != field_template['value'].to_s + if f['key'].include? 'custom_fields' + o.custom_fields[f['key'].split('.')[1]].to_s != f['value'].to_s else - o[prop].to_s != field_template['value'].to_s + o[prop].to_s != f['value'].to_s end end end