RM-4572 - check if node still exists

This commit is contained in:
Ana Bozianu
2017-01-07 20:56:14 +02:00
parent 6134f494df
commit eb412fa999

View File

@@ -268,7 +268,11 @@ public class RecordComponentIdentifierAspect extends BaseBehaviourBean
* When creating a new record the identifier is writable to allow the upload in multiple steps.
* On transaction commit make the identifier read only (remove the editable aspect).
*/
nodeService.setProperty(childAssocRef.getChildRef(), RecordsManagementModel.PROP_ID_IS_TEMPORARILY_EDITABLE, false);
NodeRef newNode = childAssocRef.getChildRef();
if(nodeService.exists(newNode))
{
nodeService.setProperty(newNode, RecordsManagementModel.PROP_ID_IS_TEMPORARILY_EDITABLE, false);
}
return null;
}
});