From 6533457400701831c524a17419f38b3c97983be7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 21 Nov 2021 19:08:01 +0100 Subject: [PATCH] always drop out of maintenance on startup --- InvenTree/plugin/apps.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index 78c3b9b93f..8a3cd97889 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals from django.apps import AppConfig +from maintenance_mode.core import set_maintenance_mode from plugin.registry import plugins @@ -11,5 +12,10 @@ class PluginAppConfig(AppConfig): def ready(self): if not plugins.is_loading: + # this is the first startup plugins.collect_plugins() plugins.load_plugins() + + # drop out of maintenance + # makes sure we did not have an error in reloading and maintenance is still active + set_maintenance_mode(False)