ItEr26S07CUAsignacionGrupoRecursosAPlanificacionItEr25S07: The task always exists on db.

When the schedule button is pressed the tasks are created so they already exist on db.
This commit is contained in:
Óscar González Fernández 2009-09-14 20:37:11 +02:00
parent 36c198c841
commit 453dd24b2e

View file

@ -221,13 +221,12 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
}
@Override
@Transactional(readOnly = true)
public void initAllocationsFor(Task task,
org.zkoss.ganttz.data.Task ganttTask) {
this.ganttTask = ganttTask;
if (!taskElementDAO.exists(task.getId())) {
this.task = task;
return;
}
assert taskElementDAO.exists(task.getId());
this.task = findFromDB(task);
reattachResourceAllocations(this.task.getResourceAllocations());
hoursGroupDAO.save(this.task.getHoursGroup());