Let jsonObjectToRecord return null as a way to mean record wasn't found (therefore, don't add it to queryOutput)

This commit is contained in:
2023-06-30 12:32:37 -05:00
parent 3ae938ac6e
commit 75ae848afd

View File

@ -502,14 +502,22 @@ public class BaseAPIActionUtil
{ {
for(int i = 0; i < resultList.length(); i++) for(int i = 0; i < resultList.length(); i++)
{ {
queryOutput.addRecord(jsonObjectToRecord(resultList.getJSONObject(i), table.getFields())); QRecord record = jsonObjectToRecord(resultList.getJSONObject(i), table.getFields());
count++; if(record != null)
{
queryOutput.addRecord(record);
count++;
}
} }
} }
else else
{ {
queryOutput.addRecord(jsonObjectToRecord(jsonObject, table.getFields())); QRecord record = jsonObjectToRecord(jsonObject, table.getFields());
count++; if(record != null)
{
queryOutput.addRecord(record);
count++;
}
} }
} }