From 4c7d295c0e446653cfb4baad5b11933cb140d1e1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 20 Nov 2021 03:20:55 +0100 Subject: [PATCH] hard reset all plugin registration mechanisms on error --- InvenTree/plugin/apps.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index dd9757cd97..657c2a1353 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -72,6 +72,11 @@ class PluginAppConfig(AppConfig): logger.error(f'Encountered an error with {error.path}:\n{error.message}') blocked_plugin = error.path + # init apps without any integration plugins + self._clean_registry() + self._clean_installed_apps() + self._activate_plugins(force_reload=True) + # remove maintenance if not _maintenance: set_maintenance_mode(False)