diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java index 76f0be44cb..218463307e 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java @@ -470,27 +470,27 @@ public EntityMutationResponse mapAttributesAndClassifications(EntityMutationCont throw baseException; } } - } else { + } - if (CollectionUtils.isNotEmpty(appendEntities)) { - for (AtlasEntity entity : appendEntities) { - String guid = entity.getGuid(); - AtlasVertex vertex = context.getVertex(guid); - AtlasEntityType entityType = context.getType(guid); - mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, true, false); - } + if (CollectionUtils.isNotEmpty(appendEntities)) { + for (AtlasEntity entity : appendEntities) { + String guid = entity.getGuid(); + AtlasVertex vertex = context.getVertex(guid); + AtlasEntityType entityType = context.getType(guid); + mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, true, false); } + } - if (CollectionUtils.isNotEmpty(removeEntities)) { - for (AtlasEntity entity : removeEntities) { - String guid = entity.getGuid(); - AtlasVertex vertex = context.getVertex(guid); - AtlasEntityType entityType = context.getType(guid); - mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, false, true); - } + if (CollectionUtils.isNotEmpty(removeEntities)) { + for (AtlasEntity entity : removeEntities) { + String guid = entity.getGuid(); + AtlasVertex vertex = context.getVertex(guid); + AtlasEntityType entityType = context.getType(guid); + mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, false, true); } } + if (CollectionUtils.isNotEmpty(context.getEntitiesToDelete())) { deleteDelegate.getHandler().deleteEntities(context.getEntitiesToDelete()); }