and safety here too

This commit is contained in:
Matthias 2021-11-17 01:59:30 +01:00
parent 7c9ba1007d
commit 6c5dd2a5a4
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -229,7 +229,11 @@ class PluginAppConfig(AppConfig):
those register models and admin in their respective objects (e.g. admin.site for admin) those register models and admin in their respective objects (e.g. admin.site for admin)
""" """
for plugin_path in settings.INTEGRATION_APPS_PATHS: for plugin_path in settings.INTEGRATION_APPS_PATHS:
try:
app_config = apps.get_app_config(plugin_path.split('.')[-1]) app_config = apps.get_app_config(plugin_path.split('.')[-1])
except LookupError:
# the plugin was never loaded correctly
break
# reload models if they were set # reload models if they were set
# models_module gets set if models were defined - even after multiple loads # models_module gets set if models were defined - even after multiple loads