mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Don't try to compute aggregates on virtual fields - that is, try-catch around the lookup of such fields
This commit is contained in:
@ -704,8 +704,24 @@ public class GenerateReportAction extends AbstractQActionFunction<ReportInput, R
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
for(String fieldName : record.getValues().keySet())
|
||||
{
|
||||
QFieldMetaData field = null;
|
||||
try
|
||||
{
|
||||
//////////////////////////////////////////////////////
|
||||
// todo - memoize this, if we ever need to optimize //
|
||||
//////////////////////////////////////////////////////
|
||||
FieldAndJoinTable fieldAndJoinTable = getFieldAndJoinTable(table, fieldName);
|
||||
QFieldMetaData field = fieldAndJoinTable.field();
|
||||
field = fieldAndJoinTable.field();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// for non-real-fields... let's skip for now - but maybe treat as string in future? //
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
LOG.debug("Couldn't find field in table qInstance - won't compute aggregates for it", logPair("fieldName", fieldName));
|
||||
continue;
|
||||
}
|
||||
|
||||
if(StringUtils.hasContent(field.getPossibleValueSourceName()))
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Reference in New Issue
Block a user