mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Force builtin plugins to be active (#4276)
* Force builtin plugins to be active - Not setting the "active" flag can cause ambiguous errors - e.g. some settings don't work if the plugin is inactive - By design, builtin plugins are always "active" anyway - This PR just forces the active field to True * Fix unit tests
This commit is contained in:
@ -148,6 +148,10 @@ class PluginConfig(models.Model):
|
||||
|
||||
ret = super().save(force_insert, force_update, *args, **kwargs)
|
||||
|
||||
if self.is_builtin():
|
||||
# Force active if builtin
|
||||
self.active = True
|
||||
|
||||
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):
|
||||
|
Reference in New Issue
Block a user