fix: [object restsearch] fixed

Endless loop fixed
pull/5871/head
iglocska 2020-05-06 14:22:05 +02:00
parent 8e256a8ce1
commit 3a8efe4bf8
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 0 deletions

View File

@ -1439,6 +1439,10 @@ class MispObject extends AppModel
while ($continue) {
$this->Whitelist = ClassRegistry::init('Whitelist');
$results = $this->fetchObjects($user, $params, $continue);
if (empty($results)) {
$loop = false;
return true;
}
if ($params['includeSightingdb']) {
$this->Sightingdb = ClassRegistry::init('Sightingdb');
$results = $this->Sightingdb->attachToObjects($results, $user);