From f8fd8709d53558f56b9d2e07ad179c7808f2dce3 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Mon, 28 Jan 2013 16:16:23 +0100
Subject: [PATCH] set correct basepac on pac create

---
 hsarback/src/de/hsadmin/mods/pac/Pac.java           |    2 +-
 hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/pac/Pac.java b/hsarback/src/de/hsadmin/mods/pac/Pac.java
index d724468..b1e53be 100644
--- a/hsarback/src/de/hsadmin/mods/pac/Pac.java
+++ b/hsarback/src/de/hsadmin/mods/pac/Pac.java
@@ -103,7 +103,7 @@
 		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()) {
diff --git a/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java b/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java
index c23525e..1490c57 100644
--- a/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java
+++ b/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java
@@ -45,6 +45,7 @@
 		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");

--
Gitblit v1.9.1