diff --git a/lib/orbf/rules_engine/data/invoice.rb b/lib/orbf/rules_engine/data/invoice.rb index 4a33a23..91ba472 100644 --- a/lib/orbf/rules_engine/data/invoice.rb +++ b/lib/orbf/rules_engine/data/invoice.rb @@ -3,7 +3,7 @@ module RulesEngine class ActivityItem < Orbf::RulesEngine::ValueObject::Model(:activity, :solution, :problem, :substitued, :variables) def after_init - @indexed_variables = (variables || {}).index_by { |v| [v.state, v.activity_code] } + @indexed_variables = variables.index_by { |v| [v.state, v.activity_code] } freeze end