added fix where Item can't indexed due to authority value not being in a controlled vocabulary

This commit is contained in:
Mykhaylo
2021-03-18 11:08:56 +01:00
parent b31cd04f52
commit 4bf75e5a05

View File

@@ -13,6 +13,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
@@ -315,6 +316,9 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Hiera
private String getNodeLabel(String key, boolean useHierarchy) {
try {
Node node = getNode(key);
if (Objects.isNull(node)) {
return null;
}
if (useHierarchy) {
return this.buildString(node);
} else {