Fix: when applying enrichments with no instance information the resulting merge entity was generated with no instance instead of keeping the original information

This commit is contained in:
Giambattista Bloisi 2024-05-03 13:57:56 +02:00
parent 00ad21d814
commit 69c5efbd8b
1 changed files with 4 additions and 2 deletions

View File

@ -874,9 +874,11 @@ public class MergeUtils {
if (toEnrichInstances == null) {
return enrichmentResult;
}
if (enrichmentInstances == null) {
return enrichmentResult;
if (enrichmentInstances == null || enrichmentInstances.isEmpty()) {
return toEnrichInstances;
}
Map<String, Instance> ri = toInstanceMap(enrichmentInstances);
toEnrichInstances.forEach(i -> {