diff --git a/InvenTree/plugin/plugin.py b/InvenTree/plugin/plugin.py index d5f6a7bccf..5f4a1e0b73 100644 --- a/InvenTree/plugin/plugin.py +++ b/InvenTree/plugin/plugin.py @@ -307,7 +307,11 @@ class InvenTreePlugin(MixinBase, MetaBase): """ if self._is_package: return self.__module__ # pragma: no cover - return pathlib.Path(self.def_path).relative_to(settings.BASE_DIR) + + try: + return pathlib.Path(self.def_path).relative_to(settings.BASE_DIR) + except ValueError: + return pathlib.Path(self.def_path) @property def settings_url(self):