From 1e572b3214f42702743531dca9f3a08eb4e15c6e Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Tue, 1 Mar 2022 17:11:14 +0200 Subject: [PATCH] Fix issue with prefilling mapping --- .../eu/eudat/logic/mapper/prefilling/PrefillingMapper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/mapper/prefilling/PrefillingMapper.java b/dmp-backend/web/src/main/java/eu/eudat/logic/mapper/prefilling/PrefillingMapper.java index d6d7320ab..f54086649 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/mapper/prefilling/PrefillingMapper.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/mapper/prefilling/PrefillingMapper.java @@ -143,7 +143,9 @@ public class PrefillingMapper { case COMBO_BOX: if (parsedValues.isEmpty()) parsedValues.add(parsedValue); - properties.put(id, parseComboBoxValues(node, parsedValues)); + if (!parsedValues.stream().allMatch(Objects::isNull)) { + properties.put(id, parseComboBoxValues(node, parsedValues)); + } break; case TAGS: properties.put(id, mapper.valueToTree(parseTags(parsedValue)).toString());