From 11d541519332eb7007416f250626fe2184f22e68 Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Mon, 29 Jul 2019 14:43:09 +0200 Subject: [PATCH] RedisWriter: Add depth attribute to zone --- lib/redis/rediswriter-objects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index 343ad3130..2b17216de 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -713,6 +713,9 @@ bool RedisWriter::PrepareObject(const ConfigObject::Ptr& object, Dictionary::Ptr attributes->Set("parent_id", GetObjectIdentifier(zone)); } + auto parentsRaw (zone->GetAllParentsRaw()); + attributes->Set("depth", parentsRaw.size()); + return true; }