From 6d82d89d1807597224b13478785e17f052649ba2 Mon Sep 17 00:00:00 2001 From: Ana Bozianu Date: Mon, 11 Apr 2016 20:04:26 +0300 Subject: [PATCH] RM-3266 - added an extra check when invoking onAddAspect --- .../model/rma/aspect/FilePlanComponentAspect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FilePlanComponentAspect.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FilePlanComponentAspect.java index 9bbc8f4116..d901b69eaf 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FilePlanComponentAspect.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FilePlanComponentAspect.java @@ -224,7 +224,8 @@ public class FilePlanComponentAspect extends BaseBehaviourBean @Override public Void doWork() { - if (nodeService.exists(nodeRef)) + // Check if the node exists and the aspect hasn't been removed in the same transaction (see RM-3266) + if (nodeService.exists(nodeRef) && nodeService.hasAspect(nodeRef, aspectTypeQName)) { // Look up the root and set on the aspect if found NodeRef root = filePlanService.getFilePlan(nodeRef);