diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java index a8e3cb3d2..09ec25cba 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java @@ -317,7 +317,11 @@ public abstract class OrderElement extends IntegrationEntity implements if(currentTaskSourceIsNotTheSame()) { //all the children of this element were unscheduled and then scheduled again, //its TaskSource has been recreated but we have to remove the old one. - result.add(taskSourceRemoval()); + if(getParent() == null || !getParent().currentTaskSourceIsNotTheSame()) { + //if it's a container node inside another container we could have the + //same problem than in the case of leaf tasks. + result.add(taskSourceRemoval()); + } } result .add(synchronizationForSuperelement(schedulingDataForVersion));