mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-23 09:22:18 +00:00
Fix #11700: While doing recursive delete, check if a previous iteration already deleted the children (#14629)
This commit is contained in:
parent
3b61938c6d
commit
9cafde3847
@ -467,7 +467,12 @@ public final class Entity {
|
||||
public static void deleteEntity(
|
||||
String updatedBy, String entityType, UUID entityId, boolean recursive, boolean hardDelete) {
|
||||
EntityRepository<?> dao = getEntityRepository(entityType);
|
||||
dao.delete(updatedBy, entityId, recursive, hardDelete);
|
||||
try {
|
||||
dao.find(entityId, Include.ALL);
|
||||
dao.delete(updatedBy, entityId, recursive, hardDelete);
|
||||
} catch (EntityNotFoundException e) {
|
||||
LOG.warn("Entity {} is already deleted.", entityId);
|
||||
}
|
||||
}
|
||||
|
||||
public static void restoreEntity(String updatedBy, String entityType, UUID entityId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user