Browse Source

Fixes #3435 - Broken counter check for attributes examples causes exchange integration wizard to check all entries instead of 50.

Martin Edenhofer 4 years ago
parent
commit
06be90f038
2 changed files with 4 additions and 2 deletions
  1. 3 1
      lib/import/exchange/folder.rb
  2. 1 1
      lib/import/helper/attributes_examples.rb

+ 3 - 1
lib/import/exchange/folder.rb

@@ -56,7 +56,9 @@ module Import
         parent = parent.id if parent.respond_to?(:id) # type coercion
         parent = parent.id if parent.respond_to?(:id) # type coercion
         @connection.folders(root: parent)
         @connection.folders(root: parent)
       rescue Viewpoint::EWS::EwsFolderNotFound => e
       rescue Viewpoint::EWS::EwsFolderNotFound => e
-        logger.warn(e) && return
+        logger.warn("Try to get children folders of: #{parent.inspect}")
+        logger.warn(e)
+        nil
       end
       end
     end
     end
   end
   end

+ 1 - 1
lib/import/helper/attributes_examples.rb

@@ -48,7 +48,7 @@ module Import
         @no_new_counter += 1
         @no_new_counter += 1
 
 
         # check max 50 entries with no or no new attributes in a row
         # check max 50 entries with no or no new attributes in a row
-        @enough_examples = @no_new_counter != 50
+        @enough = @no_new_counter != 50
 
 
         false
         false
       end
       end