mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
Enable differential.find handle empty input.
Summary: return empty array when the query input is empty. Test Plan: send empty input. Reviewed By: tuomaspelkonen Reviewers: tuomaspelkonen CC: tuomaspelkonen Differential Revision: 167
This commit is contained in:
parent
a9e2e51b98
commit
ad4a497355
1 changed files with 5 additions and 1 deletions
|
@ -51,12 +51,16 @@ class ConduitAPI_differential_find_Method extends ConduitAPIMethod {
|
||||||
$query = $request->getValue('query');
|
$query = $request->getValue('query');
|
||||||
$guids = $request->getValue('guids');
|
$guids = $request->getValue('guids');
|
||||||
|
|
||||||
|
$results = array();
|
||||||
|
if (!$guids) {
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
$revisions = id(new DifferentialRevisionListData(
|
$revisions = id(new DifferentialRevisionListData(
|
||||||
$query,
|
$query,
|
||||||
(array)$guids))
|
(array)$guids))
|
||||||
->loadRevisions();
|
->loadRevisions();
|
||||||
|
|
||||||
$results = array();
|
|
||||||
foreach ($revisions as $revision) {
|
foreach ($revisions as $revision) {
|
||||||
$diff = $revision->loadActiveDiff();
|
$diff = $revision->loadActiveDiff();
|
||||||
if (!$diff) {
|
if (!$diff) {
|
||||||
|
|
Loading…
Reference in a new issue