always reset plugin modules on collection

This commit is contained in:
Matthias 2021-11-22 00:16:09 +01:00
parent 8e7c96626f
commit c3e4a56021
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -131,6 +131,8 @@ class Plugins:
# region general plugin managment mechanisms # region general plugin managment mechanisms
def collect_plugins(self): def collect_plugins(self):
"""collect integration plugins from all possible ways of loading""" """collect integration plugins from all possible ways of loading"""
self.plugin_modules = [] # clear
# Collect plugins from paths # Collect plugins from paths
for plugin in settings.PLUGIN_DIRS: for plugin in settings.PLUGIN_DIRS:
modules = inventree_plugins.get_plugins(importlib.import_module(plugin), IntegrationPluginBase, True) modules = inventree_plugins.get_plugins(importlib.import_module(plugin), IntegrationPluginBase, True)