Commit 162824a1 authored by Adrien Morais-Mestre's avatar Adrien Morais-Mestre Committed by Adrien Morais
Browse files

fix(resources): do not create parent resource entry for metaservices (#11090)



* fix(resources): do not create parent resource entry for metaservices

* Update src/Centreon/Infrastructure/Monitoring/Resource/ResourceRepositoryRDB.php

Co-authored-by: default avatarKevin Duret <kduret@centreon.com>

Co-authored-by: default avatarKevin Duret <kduret@centreon.com>
parent 19574337
......@@ -334,9 +334,8 @@ final class ResourceRepositoryRDB extends AbstractRepositoryDRB implements Resou
$resource->setIcon($icon);
}
if ($resource->getType() === ResourceEntity::TYPE_HOST) {
$parent = null;
} else {
$parent = null;
if ($resource->getType() === ResourceEntity::TYPE_SERVICE) {
// parse parent Resource object
$parent = EntityCreator::createEntityByArray(
ResourceEntity::class,
......
Supports Markdown
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