diff --git a/dspace-api/src/main/java/org/dspace/content/Community.java b/dspace-api/src/main/java/org/dspace/content/Community.java index ed632e7e7f..0857c3260b 100644 --- a/dspace-api/src/main/java/org/dspace/content/Community.java +++ b/dspace-api/src/main/java/org/dspace/content/Community.java @@ -1091,8 +1091,15 @@ public class Community extends DSpaceObject // will call rawDelete() before removing the linkage Community parent = getParentCommunity(); - if (parent != null) + if (parent == null) { + // if removing a top level Community, simulate a REMOVE event at the Site. + if (getParentCommunity() == null) + { + ourContext.addEvent(new Event(Event.REMOVE, Constants.SITE, Site.SITE_ID, + Constants.COMMUNITY, getID(), getHandle())); + } + } else { // remove the subcommunities first Community[] subcommunities = getSubcommunities(); for (int i = 0; i < subcommunities.length; i++)