From ae22dfcdedfc6d42878a2fb624b1ab54d1b2ee2f Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 18 Jun 2020 09:02:55 +0200 Subject: [PATCH] Fixes #3090: Failed to run import backend 'Import::Exchange'. Cause: Missing implementation of 'mapping' method for 'Sequencer::Unit::Import::Exchange::FolderContact::Mapping::Login'. --- .../unit/import/common/mapping/mixin/provide_mapped.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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