From e121ad374b7d957c841a0c68a7d1db4a98ff1413 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 17 Nov 2021 02:02:47 +0100 Subject: [PATCH] more safer = more better ::inno: --- InvenTree/plugin/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index 5ed06c3dae..739c207b54 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -293,7 +293,7 @@ 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 - if models: + if models and app_name in apps.all_models: apps.all_models.pop(app_name) # remove plugin from installed_apps