From 4ab464dc9e11c5cc0153a8c1c4b907aa6900444a Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 17 Nov 2021 02:07:13 +0100 Subject: [PATCH] refactor for debug if lookups fail --- InvenTree/plugin/apps.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index b4f2d572ee..3da80f71ed 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -230,9 +230,11 @@ class PluginAppConfig(AppConfig): """ for plugin_path in settings.INTEGRATION_APPS_PATHS: try: - app_config = apps.get_app_config(plugin_path.split('.')[-1]) + app_name = plugin_path.split('.')[-1] + app_config = apps.get_app_config(app_name) except LookupError: # the plugin was never loaded correctly + logger.debug(f'{app_name} App was not found during deregistering') break # reload models if they were set