mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
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:
@ -502,14 +502,22 @@ public class BaseAPIActionUtil
|
||||
{
|
||||
for(int i = 0; i < resultList.length(); i++)
|
||||
{
|
||||
queryOutput.addRecord(jsonObjectToRecord(resultList.getJSONObject(i), table.getFields()));
|
||||
count++;
|
||||
QRecord record = jsonObjectToRecord(resultList.getJSONObject(i), table.getFields());
|
||||
if(record != null)
|
||||
{
|
||||
queryOutput.addRecord(record);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
queryOutput.addRecord(jsonObjectToRecord(jsonObject, table.getFields()));
|
||||
count++;
|
||||
QRecord record = jsonObjectToRecord(jsonObject, table.getFields());
|
||||
if(record != null)
|
||||
{
|
||||
queryOutput.addRecord(record);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user