From 11672096e7099426e1d1792bd61af8436fef4630 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 Oct 2021 19:57:42 +0200 Subject: [PATCH] always check if app already loaded --- InvenTree/plugin/apps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index 315d2d2d5d..9e925f3be2 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -33,8 +33,9 @@ class PluginConfig(AppConfig): for slug, plugin in plugins: if plugin.mixin_enabled('app'): plugin_path = '.'.join(pathlib.Path(plugin.path).relative_to(settings.BASE_DIR).parts) - settings.INSTALLED_APPS += [plugin_path] - apps_changed = True + if plugin_path not in settings.INSTALLED_APPS: + settings.INSTALLED_APPS += [plugin_path] + apps_changed = True # if apps were changed reload # TODO this is a bit jankey to be honest