Fix null value handling in getActiveCart API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-01-23 21:39:25 -08:00
parent 6727f42194
commit 186c3fcf68

View file

@ -71,16 +71,16 @@ try {
response["OK"] = true;
response["HAS_CART"] = true;
response["CART"] = {
"OrderID": qCart.OrderID,
"OrderUUID": qCart.OrderUUID,
"BusinessID": qCart.OrderBusinessID,
"OrderID": val(qCart.OrderID),
"OrderUUID": qCart.OrderUUID ?: "",
"BusinessID": val(qCart.OrderBusinessID),
"BusinessName": len(trim(qCart.BusinessName)) ? qCart.BusinessName : "",
"BusinessOrderTypes": orderTypesArray,
"OrderTypeID": qCart.OrderTypeID,
"OrderTypeID": val(qCart.OrderTypeID),
"OrderTypeName": orderTypeName,
"ServicePointID": qCart.OrderServicePointID,
"ServicePointID": val(qCart.OrderServicePointID),
"ServicePointName": len(trim(qCart.ServicePointName)) ? qCart.ServicePointName : "",
"ItemCount": qCart.ItemCount,
"ItemCount": val(qCart.ItemCount),
"AddedOn": dateTimeFormat(qCart.OrderAddedOn, "yyyy-mm-dd HH:nn:ss")
};
} else {