diff --git a/hsarback/src/de/hsadmin/mods/pac/Pac.java b/hsarback/src/de/hsadmin/mods/pac/Pac.java index 533e30b..8dc6734 100644 --- a/hsarback/src/de/hsadmin/mods/pac/Pac.java +++ b/hsarback/src/de/hsadmin/mods/pac/Pac.java @@ -87,6 +87,7 @@ public class Pac extends AbstractEntity implements Serializable { public Pac() { basepac = new BasePac(); curINetAddr = new INetAddress(); + hive = new Hive(); } public Pac(String name, Customer cust, BasePac basePac, Hive hive) { diff --git a/hsarback/src/de/hsadmin/remote/PacRemote.java b/hsarback/src/de/hsadmin/remote/PacRemote.java index c64f6de..3de8a4a 100644 --- a/hsarback/src/de/hsadmin/remote/PacRemote.java +++ b/hsarback/src/de/hsadmin/remote/PacRemote.java @@ -76,7 +76,7 @@ public class PacRemote extends AbstractRemote { } Hive hive = pac.getHive(); String hiveName = setParams.get("hive"); - if (hive == null && assertNotNull(hiveName)) { + if ((hive == null || hive.getName() == null) && assertNotNull(hiveName)) { hive = new Hive(); hive.setName(hiveName); pac.setHive(hive);