always check if app already loaded

This commit is contained in:
Matthias 2021-10-17 19:57:42 +02:00
parent d577d3778d
commit 11672096e7
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -33,8 +33,9 @@ class PluginConfig(AppConfig):
for slug, plugin in plugins:
if plugin.mixin_enabled('app'):
plugin_path = '.'.join(pathlib.Path(plugin.path).relative_to(settings.BASE_DIR).parts)
settings.INSTALLED_APPS += [plugin_path]
apps_changed = True
if plugin_path not in settings.INSTALLED_APPS:
settings.INSTALLED_APPS += [plugin_path]
apps_changed = True
# if apps were changed reload
# TODO this is a bit jankey to be honest