mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Updated RestfulServer to properly convert list instances.
This commit is contained in:
parent
c025ce7a4a
commit
43c39bed8f
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user