mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
just use the default failing mechanism
This commit is contained in:
parent
c3e4a56021
commit
a1b821bf78
@ -204,16 +204,8 @@ class Plugins:
|
|||||||
try:
|
try:
|
||||||
plugin = plugin()
|
plugin = plugin()
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
# log error
|
# log error and raise it -> disable plugin
|
||||||
get_plugin_error(error, do_log=True, log_name='init')
|
get_plugin_error(error, do_raise=True, do_log=True, log_name='init')
|
||||||
|
|
||||||
plugin_db_setting.active = False
|
|
||||||
# TODO save the error to the plugin
|
|
||||||
plugin_db_setting.save()
|
|
||||||
|
|
||||||
# add to incative plugins
|
|
||||||
self.plugins_inactive[plug_key] = plugin_db_setting
|
|
||||||
continue # continue -> the plugin is not loaded
|
|
||||||
|
|
||||||
logger.info(f'Loaded integration plugin {plugin.slug}')
|
logger.info(f'Loaded integration plugin {plugin.slug}')
|
||||||
plugin.is_package = was_packaged
|
plugin.is_package = was_packaged
|
||||||
|
Loading…
x
Reference in New Issue
Block a user