From 5f180b61e9dacfb6e5269bed9dccb8030110f1cd Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 20 Nov 2021 18:11:20 +0100 Subject: [PATCH] and another flag moved --- InvenTree/InvenTree/settings.py | 1 - InvenTree/plugin/registry.py | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index b1714c320a..9c1c14ce31 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -884,7 +884,6 @@ if DEBUG or TESTING: PLUGINS = [] INTEGRATION_PLUGIN_GLOBALSETTING = {} -INTEGRATION_APPS_LOADING = True # Marks if apps were reloaded yet INTEGRATION_APPS_PATHS = [] # Holds all added plugin_paths INTEGRATION_ERRORS = {} # Holds discovering errors diff --git a/InvenTree/plugin/registry.py b/InvenTree/plugin/registry.py index 7440a7e116..7e4d4031e8 100644 --- a/InvenTree/plugin/registry.py +++ b/InvenTree/plugin/registry.py @@ -41,6 +41,7 @@ class Plugins: # flags self.is_loading = False + self.apps_loading = True # Marks if apps were reloaded yet # region public plugin functions def load_plugins(self): @@ -269,9 +270,9 @@ class Plugins: if apps_changed or force_reload: # if apps were changed or force loading base apps -> reload - if settings.INTEGRATION_APPS_LOADING or force_reload: + if self.apps_loading or force_reload: # first startup or force loading of base apps -> registry is prob false - settings.INTEGRATION_APPS_LOADING = False + self.apps_loading = False self._reload_apps(force_reload=True) self._reload_apps() # rediscover models/ admin sites