From 48abd3cf79078863d827dde7950625571d25a5ed Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Oct 2021 04:35:24 +0200 Subject: [PATCH] remove unneeded settings --- InvenTree/InvenTree/settings.py | 3 --- InvenTree/InvenTree/urls.py | 3 +-- InvenTree/plugin/loader.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 5c67dc69f5..0eaa5b592c 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -753,13 +753,10 @@ for plugin in PLUGIN_DIRS: [PLUGINS.append(item) for item in modules] # collect integration plugins -INTEGRATION_PLUGINS = [] - INTEGRATION_PLUGIN_SETTING = {} INTEGRATION_PLUGIN_LIST = {} INTEGRATION_APPS_LOADED = False # Marks if apps were reloaded yet for plugin in inventree_plugins.load_integration_plugins(): plugin = plugin() - INTEGRATION_PLUGINS.append(plugin) INTEGRATION_PLUGIN_LIST[plugin.slug] = plugin diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 2ed421d2ac..5145442f23 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -128,8 +128,7 @@ translated_javascript_urls = [ # Integration plugin urls interation_urls = [] if InvenTreeSetting.get_setting('ENABLE_PLUGINS_URL'): - integration_plugins = settings.INTEGRATION_PLUGINS - for plugin in integration_plugins: + for plugin in settings.INTEGRATION_PLUGIN_LIST.values(): if plugin.mixin_enabled('urls'): interation_urls.append(plugin.urlpatterns) diff --git a/InvenTree/plugin/loader.py b/InvenTree/plugin/loader.py index 82680d534d..5331418b24 100644 --- a/InvenTree/plugin/loader.py +++ b/InvenTree/plugin/loader.py @@ -12,7 +12,7 @@ class PluginTemplateLoader(FilesystemLoader): def get_dirs(self): dirname = 'templates' template_dirs = [] - for plugin in settings.INTEGRATION_PLUGINS: + for plugin in settings.INTEGRATION_PLUGIN_LIST.values(): new_path = Path(plugin.path) / dirname if Path(new_path).is_dir(): template_dirs.append(new_path)