- // we remove the artifactVersion, that is the parent
- node.getParent().remove();
- node.getSession().save();
+ if (node.isNodeType(SlcTypes.SLC_ARTIFACT)) {
+ // we remove the artifactVersion, that is the parent
+ node.getParent().remove();
+ node.getSession().save();
+ }