GroupMembershipResolver: ignore unstored objects

Currently affects tests only
This commit is contained in:
Thomas Gelf 2017-07-04 06:57:54 +02:00
parent 69579bcaf9
commit 6aab867682
1 changed files with 5 additions and 1 deletions

View File

@ -124,7 +124,11 @@ abstract class GroupMembershipResolver
*/
public function addObject(IcingaObject $object)
{
$this->assertBeenLoadedFromDb($object);
if (! $object->hasBeenLoadedFromDb()) {
return $this;
}
// Disabling for now, how should this work?
// $this->assertBeenLoadedFromDb($object);
if ($this->objects === null) {
$this->objects = array();
}