From eb412fa999f270ec2ca50608fec6724072dd2bfc Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Sat, 7 Jan 2017 20:56:14 +0200 Subject: [PATCH] RM-4572 - check if node still exists --- .../model/rma/aspect/RecordComponentIdentifierAspect.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordComponentIdentifierAspect.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordComponentIdentifierAspect.java index 4a5058272c..f87f573162 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordComponentIdentifierAspect.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/RecordComponentIdentifierAspect.java @@ -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; } });