mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +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++)
|
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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user