diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/contract/ContractPreProcessor.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/contract/ContractPreProcessor.java index c4e75baf46..e7c165a328 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/contract/ContractPreProcessor.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/contract/ContractPreProcessor.java @@ -243,7 +243,7 @@ private void datasetAttributeSync(EntityMutationContext context, AtlasEntity ass AtlasEntity entity = new AtlasEntity(associatedAsset.getTypeName()); entity.setGuid(associatedAsset.getGuid()); entity.setAttribute(QUALIFIED_NAME, associatedAsset.getAttribute(QUALIFIED_NAME)); - if (!associatedAsset.getAttribute(ASSET_ATTR_HAS_CONTRACT).equals(true)) { + if (associatedAsset.getAttribute(ASSET_ATTR_HAS_CONTRACT) == null || associatedAsset.getAttribute(ASSET_ATTR_HAS_CONTRACT).equals(false)) { entity.setAttribute(ASSET_ATTR_HAS_CONTRACT, true); } entity.setAttribute(ASSET_ATTR_CONTRACT_VERSION_QUALIFIED_NAME, contractAsset.getAttribute(QUALIFIED_NAME));