add try to settings test

This commit is contained in:
Matthias 2022-03-16 17:03:04 +01:00
parent 91464ad3d0
commit 3606bd8fe4
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -30,11 +30,13 @@ class PluginAppConfig(AppConfig):
if not registry.is_loading:
# this is the first startup
from common.models import InvenTreeSetting
if InvenTreeSetting.get_setting('PLUGIN_ON_STARTUP'):
# make sure all plugins are installed
registry.install_plugin_file()
try:
from common.models import InvenTreeSetting
if InvenTreeSetting.get_setting('PLUGIN_ON_STARTUP'):
# make sure all plugins are installed
registry.install_plugin_file()
except:
pass
# get plugins and init them
registry.collect_plugins()