From dcab0c430cb8ecb5e96ff72423617bab3918d39e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Oct 2021 19:50:46 +0200 Subject: [PATCH] testing safe settings and app integration --- InvenTree/plugin/apps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index 996aa4c8a4..315d2d2d5d 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -15,7 +15,7 @@ class PluginConfig(AppConfig): plugins = settings.INTEGRATION_PLUGINS.items() # if plugin settings are enabled enhance the settings - if InvenTreeSetting.get_setting('ENABLE_PLUGINS_SETTING'): + if settings.TESTING or InvenTreeSetting.get_setting('ENABLE_PLUGINS_SETTING'): for slug, plugin in plugins: if plugin.mixin_enabled('settings'): plugin_setting = plugin.settingspatterns @@ -25,7 +25,7 @@ class PluginConfig(AppConfig): InvenTreeSetting.GLOBAL_SETTINGS.update(plugin_setting) # if plugin apps are enabled - if (not settings.INTEGRATION_APPS_LOADED) and InvenTreeSetting.get_setting('ENABLE_PLUGINS_APP'): + if settings.TESTING or ((not settings.INTEGRATION_APPS_LOADED) and InvenTreeSetting.get_setting('ENABLE_PLUGINS_APP')): settings.INTEGRATION_APPS_LOADED = True # ensure this section will not run again apps_changed = False