Fixed ALF-10113: Can't delete Web Form: Node does not exist: missing://missing/missing

Added a check for node existence before actually deleting the node.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30795 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2011-09-27 11:23:40 +00:00
parent babaa0b65c
commit 057ed36a0c

View File

@@ -113,7 +113,12 @@ public class DeleteSpaceDialog extends BaseDialogBean
{ {
this.getNodeService().addAspect(node.getNodeRef(), ContentModel.ASPECT_TEMPORARY, null); this.getNodeService().addAspect(node.getNodeRef(), ContentModel.ASPECT_TEMPORARY, null);
} }
this.getNodeService().deleteNode(node.getNodeRef());
// ensure the node still exists before deleting
if (this.getNodeService().exists(node.getNodeRef()))
{
this.getNodeService().deleteNode(node.getNodeRef());
}
} }
} }
else else
@@ -178,7 +183,12 @@ public class DeleteSpaceDialog extends BaseDialogBean
{ {
this.getNodeService().addAspect(nodeRef, ContentModel.ASPECT_TEMPORARY, null); this.getNodeService().addAspect(nodeRef, ContentModel.ASPECT_TEMPORARY, null);
} }
this.getNodeService().deleteNode(nodeRef);
// ensure the node still exists before deleting
if (this.getNodeService().exists(node.getNodeRef()))
{
this.getNodeService().deleteNode(nodeRef);
}
tx.commit(); tx.commit();
} }