IDEMPIERE-4863 : do not save when there is no customization (#1319)

This commit is contained in:
Nicolas Micoud 2022-05-10 03:56:27 +02:00 committed by GitHub
parent d144bef286
commit 603743734d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import java.util.Properties;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
import org.compiere.model.Query; import org.compiere.model.Query;
import org.compiere.model.X_AD_Wlistbox_Customization; import org.compiere.model.X_AD_Wlistbox_Customization;
import org.compiere.util.Util;
public class MWlistboxCustomization extends X_AD_Wlistbox_Customization { public class MWlistboxCustomization extends X_AD_Wlistbox_Customization {
@ -146,13 +147,15 @@ public class MWlistboxCustomization extends X_AD_Wlistbox_Customization {
WlistBoxCust.setCustom(custom); WlistBoxCust.setCustom(custom);
} }
} }
else else if (!Util.isEmpty(Custom))
{ {
WlistBoxCust = new MWlistboxCustomization(ctx, 0, trxName); WlistBoxCust = new MWlistboxCustomization(ctx, 0, trxName);
WlistBoxCust.setWlistboxName(AD_WListboxName); WlistBoxCust.setWlistboxName(AD_WListboxName);
WlistBoxCust.setAD_User_ID(AD_User_ID); WlistBoxCust.setAD_User_ID(AD_User_ID);
WlistBoxCust.setCustom(Custom); WlistBoxCust.setCustom(Custom);
} }
WlistBoxCust.saveEx();
if (WlistBoxCust != null)
WlistBoxCust.saveEx();
} // saveData } // saveData
} }