set correct basepac on pac create

This commit is contained in:
Peter Hormanns 2013-01-28 16:16:23 +01:00
parent f7416df277
commit f8fd8709d5
2 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,7 @@ public class Pac extends AbstractEntity implements Serializable {
initPacComponents(basePac);
}
private void initPacComponents(BasePac basePac) {
protected void initPacComponents(BasePac basePac) {
pacComponents = new HashSet<PacComponent>();
Date today = new Date();
for (Component comp : basePac.getComponents()) {

View File

@ -45,6 +45,7 @@ public class PacModuleImpl extends AbstractModuleImpl {
qBasepac.setParameter("valid", Boolean.TRUE);
basepac = (BasePac) qBasepac.getSingleResult();
pac.setBasepac(basepac);
pac.initPacComponents(basepac);
INetAddress curINetAddr = pac.getCurINetAddr();
if (curINetAddr == null || curINetAddr.getInetAddr() == null || curINetAddr.getInetAddr().length() == 0) {
throw new HSAdminException("curinetaddr required");