# -*- coding: utf-8 -*-

from django.apps import AppConfig


class CommonConfig(AppConfig):
    name = 'common'

    def ready(self):
        pass

@@ -18,16 +18,32 @@
 -8 -*-%0A%0A
+import logging%0A%0A
 from dja
@@ -70,16 +70,58 @@
 onfig%0A%0A%0A
+logger = logging.getLogger('inventree')%0A%0A%0A
 class Co
@@ -193,13 +193,499 @@
         
+%0A        self.clear_restart_flag()%0A%0A    def clear_restart_flag(self):%0A        %22%22%22%0A        Clear the SERVER_RESTART_REQUIRED setting%0A        %22%22%22%0A%0A        try:%0A            import common.models%0A            %0A            if common.models.InvenTreeSetting.get_setting('SERVER_RESTART_REQUIRED'):%0A                logger.info(%22Clearing SERVER_RESTART_REQUIRED flag%22)%0A                common.models.InvenTreeSetting.set_setting('SERVER_RESTART_REQUIRED', False, None)%0A        except:%0A            
 pass%0A

Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads