2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-17 18:26:32 +00:00

Adds API endpoints for viewing and updating plugin settings

A lot of code updates / refactoring here to get this to work as expected
This commit is contained in:
Oliver
2022-01-02 14:12:34 +11:00
parent f3bfe6e7ca
commit dc9e25ebad
23 changed files with 250 additions and 80 deletions

View File

@@ -64,14 +64,14 @@ class PluginDetailAPITest(InvenTreeAPITestCase):
Test the PluginConfig action commands
"""
from plugin.models import PluginConfig
from plugin import plugin_reg
from plugin import plugin_registry
url = reverse('admin:plugin_pluginconfig_changelist')
fixtures = PluginConfig.objects.all()
# check if plugins were registered -> in some test setups the startup has no db access
if not fixtures:
plugin_reg.reload_plugins()
plugin_registry.reload_plugins()
fixtures = PluginConfig.objects.all()
print([str(a) for a in fixtures])