diff --git a/lib/sequencer/unit/import/common/mapping/mixin/provide_mapped.rb b/lib/sequencer/unit/import/common/mapping/mixin/provide_mapped.rb index 432acb059..69a5f5d31 100644 --- a/lib/sequencer/unit/import/common/mapping/mixin/provide_mapped.rb +++ b/lib/sequencer/unit/import/common/mapping/mixin/provide_mapped.rb @@ -14,7 +14,11 @@ class Sequencer private def existing_mapped - @existing_mapped ||= mapped || ActiveSupport::HashWithIndifferentAccess.new + @existing_mapped ||= begin + # we need to use `state.optional` instead of just `mapped` here + # to prevent naming conflicts with other Unit methods named `mapped` + state.optional(:mapped) || ActiveSupport::HashWithIndifferentAccess.new + end end def provide_mapped