mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 13:28:49 +00:00
Convert PosixPath to string for plugin loading (#3423)
This commit is contained in:
parent
9110035370
commit
8f9981a3b6
@ -252,7 +252,8 @@ class PluginsRegistry:
|
|||||||
|
|
||||||
# If a "path" is provided, some special handling is required
|
# If a "path" is provided, some special handling is required
|
||||||
if parent_obj.name is not plugin and len(parent_obj.parts) > 1:
|
if parent_obj.name is not plugin and len(parent_obj.parts) > 1:
|
||||||
parent_path = parent_obj.parent
|
# Ensure PosixPath object is converted to a string, before passing to get_plugins
|
||||||
|
parent_path = str(parent_obj.parent)
|
||||||
plugin = parent_obj.name
|
plugin = parent_obj.name
|
||||||
|
|
||||||
modules = get_plugins(importlib.import_module(plugin), InvenTreePlugin, path=parent_path)
|
modules = get_plugins(importlib.import_module(plugin), InvenTreePlugin, path=parent_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user