Hi, there is an issue with liql call
USECASE 1 : a cover image has been uploaded for a message :
call
SELECT cover_image FROM messages WHERE id = '51'
answer
{
"status" : "success",
"message" : "",
"http_code" : 200,
"data" : {
"type" : "messages",
"list_item_type" : "message",
"size" : 1,
"items" : [ {
"type" : "message",
"cover_image" : {
"type" : "image",
"id" : "55i62BEDD185DA474C2",
.....}
}
USECASE 2 : a cover image has NOT been uploaded for a message :
call
SELECT cover_image FROM messages WHERE id = '59'
answer
{
"status" : "success",
"message" : "",
"http_code" : 200,
"data" : {
"type" : "messages",
"list_item_type" : "message",
"size" : 1,
"items" : [ {
"type" : "message",
}
The point is about the size data. Everywhere else, whene a liql query meets no result, size equals 0 in the answer. So, it's easy to have a "<if query.data.size gt 0> ...<else>...</if>" to handle properly the case.
Here, i have to check if my query.data.items[0].cover_image.xx exists but i enconter an error before, because data.items[0].cover_image doesn't exists.
Can you please fix it or give a workaround ?
Thank you very much
In a custom component, i