refactor for debug if lookups fail

This commit is contained in:
Matthias 2021-11-17 02:07:13 +01:00
parent 0f321b8e83
commit 4ab464dc9e
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -230,9 +230,11 @@ class PluginAppConfig(AppConfig):
""" """
for plugin_path in settings.INTEGRATION_APPS_PATHS: for plugin_path in settings.INTEGRATION_APPS_PATHS:
try: 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: except LookupError:
# the plugin was never loaded correctly # the plugin was never loaded correctly
logger.debug(f'{app_name} App was not found during deregistering')
break break
# reload models if they were set # reload models if they were set