mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +00:00
Bug fix for plugin reload mechanism (#5660)
- Save updated hash after reload - Use actual *value* of active, not the function object!
This commit is contained in:
parent
ffda700244
commit
3d8e3f1625
@ -275,6 +275,8 @@ class PluginsRegistry:
|
|||||||
self.plugins_loaded = True
|
self.plugins_loaded = True
|
||||||
self._load_plugins(full_reload=full_reload)
|
self._load_plugins(full_reload=full_reload)
|
||||||
|
|
||||||
|
self.update_plugin_hash()
|
||||||
|
|
||||||
self.loading_lock.release()
|
self.loading_lock.release()
|
||||||
logger.info('Plugin Registry: Loaded %s plugins', len(self.plugins))
|
logger.info('Plugin Registry: Loaded %s plugins', len(self.plugins))
|
||||||
|
|
||||||
@ -660,7 +662,7 @@ class PluginsRegistry:
|
|||||||
for slug, plug in self.plugins.items():
|
for slug, plug in self.plugins.items():
|
||||||
data.update(str(slug).encode())
|
data.update(str(slug).encode())
|
||||||
data.update(str(plug.version).encode())
|
data.update(str(plug.version).encode())
|
||||||
data.update(str(plug.is_active).encode())
|
data.update(str(plug.is_active()).encode())
|
||||||
|
|
||||||
return str(data.hexdigest())
|
return str(data.hexdigest())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user