Added a check to see if the aspect hasn't been removed in the same

transaction.
This commit is contained in:
Tuna Aksoy
2016-12-19 18:45:17 +00:00
parent 2fd7720db5
commit 9c7ee3acd2

View File

@@ -203,7 +203,8 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
@Override @Override
public Void doWork() 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 // Look up the root and set on the aspect if found
NodeRef root = filePlanService.getFilePlan(nodeRef); NodeRef root = filePlanService.getFilePlan(nodeRef);