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:
parent
a414fc497f
commit
15ab2141da
1 changed files with 9 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue