From 6f1d1ebb04d9b77b580e7fc55f422810bf404ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Gonz=C3=A1lez=20Fern=C3=A1ndez?= Date: Fri, 1 Jan 2010 19:37:29 +0100 Subject: [PATCH] ItEr41S16ImplantacionAplicacionItEr40S21: [Bug #222] Fixing bug. Checking resource's calendar is not null. --- .../web/planner/allocation/ResourceAllocationModel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/ResourceAllocationModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/ResourceAllocationModel.java index e55163a12..e03d455c9 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/ResourceAllocationModel.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/ResourceAllocationModel.java @@ -317,7 +317,9 @@ public class ResourceAllocationModel implements IResourceAllocationModel { private void reattachResource(Resource resource) { resourceDAO.reattach(resource); reattachCriterionSatisfactions(resource.getCriterionSatisfactions()); - calendarDAO.reattachUnmodifiedEntity(resource.getCalendar()); + if (resource.getCalendar() != null) { + calendarDAO.reattachUnmodifiedEntity(resource.getCalendar()); + } for (DayAssignment dayAssignment : resource.getAssignments()) { Hibernate.initialize(dayAssignment); }