diff --git a/src/main/java/org/sigmah/client/ui/presenter/contact/ContactDetailsPresenter.java b/src/main/java/org/sigmah/client/ui/presenter/contact/ContactDetailsPresenter.java index a8e69c023..935ec7388 100644 --- a/src/main/java/org/sigmah/client/ui/presenter/contact/ContactDetailsPresenter.java +++ b/src/main/java/org/sigmah/client/ui/presenter/contact/ContactDetailsPresenter.java @@ -620,8 +620,8 @@ protected void onCommandSuccess(ListResult result) { Iterator valuesIterator = valueChanges.iterator(); while (valuesIterator.hasNext()) { ValueEvent valueEvent = valuesIterator.next(); - - if (valueEvent.getIterationId() == iterationChange.getIterationId()) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == iterationChange.getIterationId()) { valuesIterator.remove(); } } @@ -634,7 +634,8 @@ protected void onCommandSuccess(ListResult result) { newIterationsTabItems.get(oldId).setIterationId(newId); for (ValueEvent valueEvent : valueChanges) { - if (valueEvent.getIterationId() == oldId) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == oldId) { valueEvent.setIterationId(newId); } } diff --git a/src/main/java/org/sigmah/client/ui/presenter/orgunit/OrgUnitDetailsPresenter.java b/src/main/java/org/sigmah/client/ui/presenter/orgunit/OrgUnitDetailsPresenter.java index b80149477..7527d2dbf 100644 --- a/src/main/java/org/sigmah/client/ui/presenter/orgunit/OrgUnitDetailsPresenter.java +++ b/src/main/java/org/sigmah/client/ui/presenter/orgunit/OrgUnitDetailsPresenter.java @@ -546,8 +546,8 @@ protected void onCommandSuccess(ListResult result) { Iterator valuesIterator = valueChanges.iterator(); while (valuesIterator.hasNext()) { ValueEvent valueEvent = valuesIterator.next(); - - if (valueEvent.getIterationId() == iterationChange.getIterationId()) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == iterationChange.getIterationId()) { valuesIterator.remove(); } } @@ -561,7 +561,8 @@ protected void onCommandSuccess(ListResult result) { newIterationsTabItems.get(oldId).setIterationId(newId); for (ValueEvent valueEvent : valueChanges) { - if (valueEvent.getIterationId() == oldId) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == oldId) { valueEvent.setIterationId(newId); } } diff --git a/src/main/java/org/sigmah/client/ui/presenter/project/ProjectDetailsPresenter.java b/src/main/java/org/sigmah/client/ui/presenter/project/ProjectDetailsPresenter.java index 4259782a7..455f94de8 100644 --- a/src/main/java/org/sigmah/client/ui/presenter/project/ProjectDetailsPresenter.java +++ b/src/main/java/org/sigmah/client/ui/presenter/project/ProjectDetailsPresenter.java @@ -580,8 +580,8 @@ protected void onCommandSuccess(ListResult result) { Iterator valuesIterator = valueChanges.iterator(); while (valuesIterator.hasNext()) { ValueEvent valueEvent = valuesIterator.next(); - - if (valueEvent.getIterationId() == iterationChange.getIterationId()) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == iterationChange.getIterationId()) { valuesIterator.remove(); } } @@ -594,7 +594,8 @@ protected void onCommandSuccess(ListResult result) { newIterationsTabItems.get(oldId).setIterationId(newId); for (ValueEvent valueEvent : valueChanges) { - if (valueEvent.getIterationId() == oldId) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == oldId) { valueEvent.setIterationId(newId); } } diff --git a/src/main/java/org/sigmah/client/ui/presenter/project/dashboard/PhasesPresenter.java b/src/main/java/org/sigmah/client/ui/presenter/project/dashboard/PhasesPresenter.java index 6a2cb9b67..34fd33a92 100644 --- a/src/main/java/org/sigmah/client/ui/presenter/project/dashboard/PhasesPresenter.java +++ b/src/main/java/org/sigmah/client/ui/presenter/project/dashboard/PhasesPresenter.java @@ -1521,8 +1521,8 @@ private void updateLayoutGroupIteration(ListResult result) { Iterator valuesIterator = valueChanges.iterator(); while (valuesIterator.hasNext()) { ValueEvent valueEvent = valuesIterator.next(); - - if (valueEvent.getIterationId() == iterationChange.getIterationId()) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == iterationChange.getIterationId()) { valuesIterator.remove(); } } @@ -1535,7 +1535,8 @@ private void updateLayoutGroupIteration(ListResult result) { newIterationsTabItems.get(oldId).setIterationId(newId); for (ValueEvent valueEvent : valueChanges) { - if (valueEvent.getIterationId() == oldId) { + Integer iterationId = valueEvent.getIterationId(); + if (iterationId != null && iterationId == oldId) { valueEvent.setIterationId(newId); } }