From 4513ad5ab66c0d9470eaec8cbcb716de1a22a2fb Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 17 Nov 2021 02:02:23 +0100 Subject: [PATCH] and this also --- InvenTree/plugin/apps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index decbd333d2..5ed06c3dae 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -293,7 +293,8 @@ class PluginAppConfig(AppConfig): # clear the registry for that app # so that the import trick will work on reloading the same plugin # -> the registry is kept for the whole lifecycle - apps.all_models.pop(app_name) + if models: + apps.all_models.pop(app_name) # remove plugin from installed_apps for plugin in settings.INTEGRATION_APPS_PATHS: