From d81734371cb48827c0a4295a55aebb3ee9c3ebd9 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Fri, 29 Dec 2017 18:08:46 +0100 Subject: [PATCH] fix default pricelist setting --- .../java/de/hsadmin/service/customer/CustomerService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cust-services/src/main/java/de/hsadmin/service/customer/CustomerService.java b/cust-services/src/main/java/de/hsadmin/service/customer/CustomerService.java index f331453..4c265ca 100644 --- a/cust-services/src/main/java/de/hsadmin/service/customer/CustomerService.java +++ b/cust-services/src/main/java/de/hsadmin/service/customer/CustomerService.java @@ -22,6 +22,8 @@ import de.hsadmin.login.RequiredScope; import de.hsadmin.login.Role; import de.hsadmin.login.ScopePolicy; import de.hsadmin.module.impl.AbstractModule; +import de.hsadmin.module.property.StringSet; +import de.hsadmin.module.property.StringSetProperty; import de.hsadmin.module.util.QueryBuilder; @Stateless @@ -45,7 +47,9 @@ public class CustomerService extends AbstractModule implements Custo final CustomerVO customerVO = super.create(requestContext, prototype); final String[] priceLists = customerVO.getPriceLists(); if (priceLists == null) { - customerVO.setPriceLists(new String[] { "Standard" }); + final StringSet stringSet = new StringSet(); + stringSet.setStrings(new String[] { "Standard" }); + ((StringSetProperty) customerVO.get("priceLists")).setValue(stringSet); } final Customer customerBO = new Customer(); customerVO.copyPropertiesToPersistentObject(customerBO);