mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
add try-catch around value casting
This commit is contained in:
@ -33,6 +33,7 @@ import java.util.Objects;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import com.kingsrook.qqq.backend.core.actions.customizers.QCodeLoader;
|
import com.kingsrook.qqq.backend.core.actions.customizers.QCodeLoader;
|
||||||
import com.kingsrook.qqq.backend.core.actions.tables.QueryAction;
|
import com.kingsrook.qqq.backend.core.actions.tables.QueryAction;
|
||||||
|
import com.kingsrook.qqq.backend.core.exceptions.QValueException;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QCriteriaOperator;
|
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QCriteriaOperator;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QFilterCriteria;
|
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QFilterCriteria;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QQueryFilter;
|
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QQueryFilter;
|
||||||
@ -156,10 +157,20 @@ public class QPossibleValueTranslator
|
|||||||
return (null);
|
return (null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if(field.getType().equals(QFieldType.INTEGER) && !(value instanceof Integer))
|
if(field.getType().equals(QFieldType.INTEGER) && !(value instanceof Integer))
|
||||||
{
|
{
|
||||||
value = ValueUtils.getValueAsInteger(value);
|
value = ValueUtils.getValueAsInteger(value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(QValueException e)
|
||||||
|
{
|
||||||
|
LOG.info("Error translating possible value raw value...");
|
||||||
|
///////////////////////////
|
||||||
|
// leave value as it was //
|
||||||
|
///////////////////////////
|
||||||
|
}
|
||||||
|
|
||||||
return translatePossibleValue(possibleValueSource, value);
|
return translatePossibleValue(possibleValueSource, value);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user