IcingaDB: actually write parent to parent_id of zones

This fixes that the code used the wrong variable. Previously, it was written to
Redis that each zone is its own parent (if it has a parent at all).
This commit is contained in:
Julian Brost 2021-10-08 11:15:47 +02:00
parent 544b9989f0
commit df84a498f4
1 changed files with 1 additions and 1 deletions

View File

@ -1187,7 +1187,7 @@ bool IcingaDB::PrepareObject(const ConfigObject::Ptr& object, Dictionary::Ptr& a
Zone::Ptr parent = zone->GetParent();
if (parent) {
attributes->Set("parent_id", GetObjectIdentifier(zone));
attributes->Set("parent_id", GetObjectIdentifier(parent));
}
auto parentsRaw (zone->GetAllParentsRaw());