MINOR: Updated RestfulServer to properly convert list instances.

This commit is contained in:
ajshort 2011-05-03 13:11:09 +10:00
parent c025ce7a4a
commit 43c39bed8f

View File

@ -241,7 +241,7 @@ class RestfulServer extends Controller {
$rawFields = $this->request->getVar('fields'); $rawFields = $this->request->getVar('fields');
$fields = $rawFields ? explode(',', $rawFields) : null; $fields = $rawFields ? explode(',', $rawFields) : null;
if($obj instanceof DataObjectSet) { if($obj instanceof SS_List) {
$responseFormatter->setTotalSize($obj->dataQuery()->query()->unlimitedRowCount()); $responseFormatter->setTotalSize($obj->dataQuery()->query()->unlimitedRowCount());
return $responseFormatter->convertDataObjectSet($obj, $fields); return $responseFormatter->convertDataObjectSet($obj, $fields);
} else if(!$obj) { } else if(!$obj) {