From d4bc6ae7a1da4788aadb0c9be4d4c8508efd4a8c Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 2 Oct 2015 13:46:13 -0700 Subject: [PATCH] Fixes #105 --- lemur/common/managers.py | 3 ++- lemur/plugins/views.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lemur/common/managers.py b/lemur/common/managers.py index 4e693677..79f4cb1d 100644 --- a/lemur/common/managers.py +++ b/lemur/common/managers.py @@ -22,7 +22,8 @@ class InstanceManager(object): def add(self, class_path): self.cache = None - self.class_list.append(class_path) + if class_path not in self.class_list: + self.class_list.append(class_path) def remove(self, class_path): self.cache = None diff --git a/lemur/plugins/views.py b/lemur/plugins/views.py index ddbe780e..d2dd606a 100644 --- a/lemur/plugins/views.py +++ b/lemur/plugins/views.py @@ -86,7 +86,7 @@ class PluginsList(AuthenticatedResource): if args['type']: return list(plugins.all(plugin_type=args['type'])) - return plugins.all() + return list(plugins.all()) class Plugins(AuthenticatedResource):