From 5b6138afa8dd52e44961b96ab459efb851db9879 Mon Sep 17 00:00:00 2001 From: Steve Paras-Charlton Date: Fri, 14 Jun 2024 08:15:25 -0600 Subject: [PATCH] ZPS-8945: do not duplicate -addition and -replacement templates in returned list --- ZenPacks/zenoss/ZenPackLib/lib/base/DeviceBase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZenPacks/zenoss/ZenPackLib/lib/base/DeviceBase.py b/ZenPacks/zenoss/ZenPackLib/lib/base/DeviceBase.py index f35a885..4bf7be5 100644 --- a/ZenPacks/zenoss/ZenPackLib/lib/base/DeviceBase.py +++ b/ZenPacks/zenoss/ZenPackLib/lib/base/DeviceBase.py @@ -81,7 +81,8 @@ def getRRDTemplates(self): template_name.endswith('-addition'): # adding here doesn't hurt since we check below, and allows RM # code to already supply these for us - templates.append(template) + if template not in templates: + templates.append(template) continue replacement = self.getRRDTemplateByName( @@ -100,7 +101,6 @@ def getRRDTemplates(self): if addition: if addition not in templates: templates.append(addition) - additionName = addition.titleOrId() return templates