IDEMPIERE-5125 Opening/Close right panel cause DB Error (#1089)

This commit is contained in:
Carlos Ruiz 2021-12-24 14:32:53 +01:00 committed by GitHub
parent adba43ced0
commit ed4f3e7786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -23,6 +23,7 @@ import org.compiere.model.Query;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Language;
import org.compiere.util.Util;
/**
*
@ -110,7 +111,7 @@ public final class UserPreference implements Serializable {
String attribute = PROPERTIES[i];
String value = props.getProperty(attribute);
if (value != null) {
if (!Util.isEmpty(value)) {
MPreference preference = query.setParameters(new Object[]{m_AD_User_ID, attribute}).firstOnly();
if (preference == null) {
preference = new MUserPreference(Env.getCtx(), 0, null);
@ -153,7 +154,6 @@ public final class UserPreference implements Serializable {
if (preference != null && preference.getValue() != null) {
value = preference.getValue();
}
props.setProperty(attribute, value);
}
}