From 7ac8479e300ded1cecbd41a68c19906e4ab02020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Tue, 14 Jul 2020 12:16:41 +0200 Subject: [PATCH] Skip data mapping for missing fields --- pkg/ngimporter/map_data.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/ngimporter/map_data.go b/pkg/ngimporter/map_data.go index ce6014166..f2e196e27 100644 --- a/pkg/ngimporter/map_data.go +++ b/pkg/ngimporter/map_data.go @@ -128,7 +128,10 @@ func mapData(is types.ImportSource) ([]types.ImportSource, error) { } } - val := record[hMap[from]] + val := "" + if i, has := hMap[from]; has { + val = record[i] + } // handle data join if strings.Contains(from, ".") {