Always returns ID when fetch_only

This commit is contained in:
weryques 2018-05-07 15:42:39 -03:00
parent 47312f8f93
commit 745da67be3
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,8 @@ class REST_Items_Controller extends REST_Controller {
} }
$attributes_to_filter = $request['fetch_only']; $attributes_to_filter = $request['fetch_only'];
# Always returns id
$attributes_to_filter[] = 'id';
$item_arr = $this->filter_object_by_attributes($item, $attributes_to_filter); $item_arr = $this->filter_object_by_attributes($item, $attributes_to_filter);
if(array_key_exists('meta', $attributes_to_filter)){ if(array_key_exists('meta', $attributes_to_filter)){