From 21fbea84dcdc45d6960d8e85d2e9bce751efbadc Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Thu, 16 Apr 2015 15:46:54 -0700 Subject: [PATCH] Simple fix for duplicate children --- autoapi/domains/dotnet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autoapi/domains/dotnet.py b/autoapi/domains/dotnet.py index 733764e..ecb128f 100644 --- a/autoapi/domains/dotnet.py +++ b/autoapi/domains/dotnet.py @@ -92,7 +92,7 @@ class DotNetDomain(AutoAPIDomain): 'type': 'namespace'}) self.app.env.autoapi_data.append(ns_obj) self.namespaces[ns_obj.id] = ns_obj - if obj not in ns_obj.children: + if obj.id not in (child.id for child in ns_obj.children): ns_obj.children.append(obj) _recurse_ns(ns_obj) @@ -109,7 +109,6 @@ class DotNetDomain(AutoAPIDomain): def generate_output(self): for obj in self.app.env.autoapi_data: - # TODO not here! for child in obj.children: obj.item_map[child.type].append(child)