Fix audit issue

This commit is contained in:
Mihai Cozma
2016-09-19 15:06:13 +03:00
parent fbe55ac0a9
commit ad163b0301

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
{