mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 01:36:29 +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:
@@ -408,6 +408,11 @@ class PluginsRegistry:
|
||||
# Check if this is a 'builtin' plugin
|
||||
builtin = plg.check_is_builtin()
|
||||
|
||||
# Auto-enable builtin plugins
|
||||
if builtin and plg_db and not plg_db.active:
|
||||
plg_db.active = True
|
||||
plg_db.save()
|
||||
|
||||
# Determine if this plugin should be loaded:
|
||||
# - If PLUGIN_TESTING is enabled
|
||||
# - If this is a 'builtin' plugin
|
||||
|
Reference in New Issue
Block a user