From 3d2113d98bbd324aaf1a127a9ca3614acc44e338 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 20 Jan 2022 23:53:50 +0100 Subject: [PATCH] make simpler --- InvenTree/plugin/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py index d6fd71d7c4..713d8daf27 100644 --- a/InvenTree/plugin/models.py +++ b/InvenTree/plugin/models.py @@ -94,10 +94,8 @@ class PluginConfig(models.Model): ret = super().save(force_insert, force_update, *args, **kwargs) if not reload: - if self.active is False and self.__org_active is True: - registry.reload_plugins() - - elif self.active is True and self.__org_active is False: + if (self.active is False and self.__org_active is True) or \ + (self.active is True and self.__org_active is False): registry.reload_plugins() return ret