From ee68736e9c6b32414463075dff13a660b9579ce6 Mon Sep 17 00:00:00 2001 From: Nikhil P Bonte Date: Thu, 14 Sep 2023 13:10:33 +0530 Subject: [PATCH] Update Deleted Queries fails with NPE --- .../store/graph/v2/preprocessor/PreProcessorUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java index 2803562e2b..6c84900460 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java @@ -73,7 +73,7 @@ public static String updateQueryResourceAttributes(AtlasTypeRegistry typeRegistr entity.setAttribute(QUALIFIED_NAME, qualifiedName); //Check if parent attribute is changed - if (parentAttribute.getAttributeType().areEqualValues(currentParentObjectId, newParentObjectId, context.getGuidAssignments())) { + if (currentParentObjectId == null || parentAttribute.getAttributeType().areEqualValues(currentParentObjectId, newParentObjectId, context.getGuidAssignments())) { return null; }