Fix audit issue

This commit is contained in:
Mihai Cozma
2016-09-19 14:46:42 +03:00
parent 70ec0ebc4f
commit d8f0c87c5b

View File

@@ -1436,8 +1436,11 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
if (entry.getEvent().equals("createPerson") && entry.getNodeRef() != null)
{
NodeRef nodeRef = entry.getNodeRef();
String userName = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
json.put("nodeName", userName == null ? "": userName);
String userName = "";
if (nodeService.exists(nodeRef))
{
userName = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
}
}
else
{