1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Fix almanac.queryservices for no results

Summary: Ref T5833. We try to load bindings even if we get no services back.

Test Plan: Queried invalid results.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10880
This commit is contained in:
epriestley 2014-11-19 15:19:49 -08:00
parent a414fc497f
commit 15ab2141da

View file

@ -52,11 +52,15 @@ final class AlmanacQueryServicesConduitAPIMethod
$services = $query->executeWithCursorPager($pager); $services = $query->executeWithCursorPager($pager);
if ($services) {
$bindings = id(new AlmanacBindingQuery()) $bindings = id(new AlmanacBindingQuery())
->setViewer($viewer) ->setViewer($viewer)
->withServicePHIDs(mpull($services, 'getPHID')) ->withServicePHIDs(mpull($services, 'getPHID'))
->execute(); ->execute();
$bindings = mgroup($bindings, 'getServicePHID'); $bindings = mgroup($bindings, 'getServicePHID');
} else {
$bindings = array();
}
$data = array(); $data = array();
foreach ($services as $service) { foreach ($services as $service) {