From 432a9b2e4dfad2d309b85a85ce12442942afaf43 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 11 May 2022 23:12:21 +0200 Subject: [PATCH] add warning if plugin testing - is need to probe for --- InvenTree/plugin/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py index 90fe447103..cacaabb1d8 100644 --- a/InvenTree/plugin/models.py +++ b/InvenTree/plugin/models.py @@ -4,10 +4,12 @@ Plugin model definitions # -*- coding: utf-8 -*- from __future__ import unicode_literals +from logging import warning from django.utils.translation import gettext_lazy as _ from django.db import models from django.contrib.auth.models import User +from django.conf import settings import common.models @@ -97,6 +99,8 @@ class PluginConfig(models.Model): if not reload: if (self.active is False and self.__org_active is True) or \ (self.active is True and self.__org_active is False): + if settings.PLUGIN_TESTING: + warning('A reload was triggered') registry.reload_plugins() return ret