From ab461253d0bfffc51ade1b1786ac1d15a4d1b435 Mon Sep 17 00:00:00 2001
From: "d.buechler" <d.buechler@adito.de>
Date: Wed, 4 Dec 2019 11:02:14 +0100
Subject: [PATCH] Added checks if pattern has been configured

---
 process/DuplicateScanner_lib/process.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/process/DuplicateScanner_lib/process.js b/process/DuplicateScanner_lib/process.js
index 2ea26a9c22..f26626af84 100644
--- a/process/DuplicateScanner_lib/process.js
+++ b/process/DuplicateScanner_lib/process.js
@@ -774,7 +774,11 @@ DuplicateScannerUtils.GetBlockSize = function()
 DuplicateScannerUtils.GetEntityFieldsFromConfig = function(pFilterName, pTargetEntity)
 {
     let indexPattern = _DuplicateScannerUtils._loadIndexPattern(pFilterName, pTargetEntity);
+    if(indexPattern == null || indexPattern == "")
+        return [];
     let fieldConfigs = _DuplicateScannerUtils._loadEntityFieldConfigsFromPattern(indexPattern);
+    if(fieldConfigs == null || fieldConfigs.length < 1)
+        return [];
     let entityFields = _DuplicateScannerUtils._loadEntityFieldsFromFieldConfigs(fieldConfigs);
     let entityIdField = _DuplicateScannerUtils._loadEntityIdField(pFilterName, pTargetEntity);
     entityFields.push(entityIdField);
-- 
GitLab