Commit b3937061 authored by Mark Harding's avatar Mark Harding

(fix): remove response key

parent 0661d268
No related merge requests found
Pipeline #77846142 waiting for delayed job with stages
in 9 minutes and 51 seconds
......@@ -99,14 +99,16 @@ class Manager
// Hydrate the entities
// TODO: make this a bulk request vs sequential
foreach ($response as $suggestion) {
foreach ($response as $k => $suggestion) {
$entity = $suggestion->getEntity() ?: $this->entitiesBuilder->single($suggestion->getEntityGuid());
if (!$entity) {
error_log("{$suggestion->getEntityGuid()} suggested user not found");
unset($response[$k]);
continue;
}
if ($entity->getDeleted()) {
error_log("Deleted entity ".$entity->guid." has been omitted from suggestions t-".time());
unset($response[$k]);
continue;
}
$suggestion->setEntity($entity);
......
Markdown is supported
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