DS-2889: Fix AuthorizeException by getting a reference to logo prior to nullifying

This commit is contained in:
Tim Donohue
2015-11-13 16:38:38 +00:00
parent 87596fe296
commit daf26a1137

View File

@@ -202,13 +202,14 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
canEdit(context, community);
}
// First, delete any existing logo
if (community.getLogo() != null)
// First, delete any existing logo
Bitstream oldLogo = community.getLogo();
if (oldLogo != null)
{
log.info(LogManager.getHeader(context, "remove_logo",
"community_id=" + community.getID()));
community.setLogo(null);
bitstreamService.delete(context, community.getLogo());
bitstreamService.delete(context, oldLogo);
}
if (is != null)