From 603743734d90fa74ee1c9e2288497d5f8bc4e7c6 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud <58596990+nmicoud@users.noreply.github.com> Date: Tue, 10 May 2022 03:56:27 +0200 Subject: [PATCH] IDEMPIERE-4863 : do not save when there is no customization (#1319) --- .../src/org/adempiere/model/MWlistboxCustomization.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java b/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java index 9c3f22206b..2264529f0b 100644 --- a/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java +++ b/org.adempiere.base/src/org/adempiere/model/MWlistboxCustomization.java @@ -25,6 +25,7 @@ import java.util.Properties; import org.compiere.model.MColumn; import org.compiere.model.Query; import org.compiere.model.X_AD_Wlistbox_Customization; +import org.compiere.util.Util; public class MWlistboxCustomization extends X_AD_Wlistbox_Customization { @@ -146,13 +147,15 @@ public class MWlistboxCustomization extends X_AD_Wlistbox_Customization { WlistBoxCust.setCustom(custom); } } - else + else if (!Util.isEmpty(Custom)) { WlistBoxCust = new MWlistboxCustomization(ctx, 0, trxName); WlistBoxCust.setWlistboxName(AD_WListboxName); WlistBoxCust.setAD_User_ID(AD_User_ID); WlistBoxCust.setCustom(Custom); } - WlistBoxCust.saveEx(); + + if (WlistBoxCust != null) + WlistBoxCust.saveEx(); } // saveData }