diff --git a/mibios/umrad/fields.py b/mibios/umrad/fields.py index 26950d2..eede8e7 100644 --- a/mibios/umrad/fields.py +++ b/mibios/umrad/fields.py @@ -193,6 +193,8 @@ def get_prep_value(self, value): elif self.root is None: return str(value) else: + if not isinstance(value, Path): + value = Path(value) return str(value.relative_to(self.root)) def value_to_string(self, obj):