Bug #1430: Fixing issue checking code for each child and not for the parent node

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-05-03 17:20:41 +02:00
parent f8441d78cd
commit 151bb46bb4

View file

@ -622,15 +622,15 @@ public final class OrderElementConverter {
update(orderElement.getOrderElement(childDTO.code),
childDTO, configuration);
} else {
if (checkConstraintUniqueOrderCode(orderElementDTO)) {
throw new ValidationException(_(
"Task {0}: Duplicate code in DB",
orderElementDTO.code));
if (checkConstraintUniqueOrderCode(childDTO)) {
throw new ValidationException(
_("Task {0}: Duplicate code in DB",
childDTO.code));
}
if (checkConstraintUniqueHoursGroupCode(orderElementDTO)) {
if (checkConstraintUniqueHoursGroupCode(childDTO)) {
throw new ValidationException(_(
"Hours Group {0}: Duplicate code in DB",
orderElementDTO.code));
childDTO.code));
}
((OrderLineGroup) orderElement).add(toEntity(childDTO,
configuration));