ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #120] Changing the implementation of initEdit to correct the bug
This commit is contained in:
parent
92899ccbe7
commit
e7f13dfe39
1 changed files with 7 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ package org.navalplanner.web.costcategories;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
|
||||
import org.navalplanner.business.common.exceptions.ValidationException;
|
||||
import org.navalplanner.business.costcategories.daos.ITypeOfWorkHoursDAO;
|
||||
import org.navalplanner.business.costcategories.entities.TypeOfWorkHours;
|
||||
|
|
@ -71,7 +72,12 @@ public class TypeOfWorkHoursModel implements ITypeOfWorkHoursModel {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public void initEdit(TypeOfWorkHours typeOfWorkHours) {
|
||||
this.typeOfWorkHours = typeOfWorkHours;
|
||||
try {
|
||||
this.typeOfWorkHours = typeOfWorkHoursDAO.find(typeOfWorkHours.getId());
|
||||
}
|
||||
catch(InstanceNotFoundException e) {
|
||||
initCreate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue