Commit 41ad17c1 authored by drumm's avatar drumm
Browse files

Issue #3117465: Fix notices when a release is unpublished

parent 1f220a46
......@@ -253,6 +253,10 @@ function project_usage_restws_response_alter(&$response, $function, $formatName,
}
foreach ($usage as $project_nid => $releases) {
foreach ($releases as $nid => $count) {
if (!isset($release_branches[$nid])) {
// Release is unpublished, or otherwise missing.
continue;
}
if (isset($response['list'][$nid_map[$project_nid]]['project_usage'][$release_branches[$nid]])) {
$response['list'][$nid_map[$project_nid]]['project_usage'][$release_branches[$nid]] += $count;
}
......
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