Skip to content

Commit

Permalink
Merge pull request #3778 from atlanhq/mesh-283
Browse files Browse the repository at this point in the history
MESH-283 : Unlink domain from asset to delete
  • Loading branch information
PRATHAM2002-DS authored Nov 20, 2024
2 parents 4c992ae + 09adb51 commit cf90e1c
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public void processAttributes(AtlasStruct entityStruct, EntityMutationContext co
case UPDATE:
processUpdateAsset(entity, vertex);
break;
case DELETE:
processDelete(vertex);
break;
}
}

Expand Down Expand Up @@ -116,6 +119,14 @@ private void validateDomainAssetLinks(AtlasEntity entity) throws AtlasBaseExcept
}
}

@Override
public void processDelete(AtlasVertex vertex) throws AtlasBaseException {
//remove the domain link
if (vertex != null) {
vertex.removeProperty(DOMAIN_GUIDS);
}
}

private void isAuthorized(AtlasVertex vertex) throws AtlasBaseException {
AtlasEntityHeader sourceEntity = retrieverNoRelation.toAtlasEntityHeaderWithClassifications(vertex);

Expand Down

0 comments on commit cf90e1c

Please sign in to comment.