port pr1973

This commit is contained in:
Terry Brady
2018-08-06 11:25:22 -07:00
parent 3eb16056c6
commit 0ced11c0af
2 changed files with 15 additions and 3 deletions

View File

@@ -452,9 +452,6 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
rawDelete(context, childCommunity);
childCommunity.removeParentCommunity(parentCommunity);
parentCommunity.removeSubCommunity(childCommunity);
log.info(LogManager.getHeader(context, "remove_subcommunity",
"parent_comm_id=" + parentCommunity.getID() + ",child_comm_id=" + childCommunity
.getID()));
@@ -553,6 +550,13 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
// Remove any Handle
handleService.unbindHandle(context, community);
// Remove the parent-child relationship for the community we want to delete
Community parent = (Community) getParentObject(context, community);
if (parent != null) {
community.removeParentCommunity(parent);
parent.removeSubCommunity(community);
}
Group g = community.getAdministrators();
// Delete community row