Commit dade81b8 authored by drumm's avatar drumm
Browse files

Avoid notices and extra work when full=0 query parameter is used

parent 509a9e1c
......@@ -213,6 +213,10 @@ function project_usage_restws_response_alter(&$response, $function, $formatName,
$release_nids = [];
$project_node_types = project_project_node_types();
foreach ($response['list'] as $i => $node_info) {
if (!isset($node_info['nid'])) {
// The full=0 query parameter was used, altering is not needed.
$nid_map[$node_info['nid']] = $i;
if (in_array($node_info['type'], $release_node_types)) {
$release_nids[] = $node_info['nid'];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment