diff --git a/src/python/models/items.py b/src/python/models/items.py index 976fb013..ee441d56 100644 --- a/src/python/models/items.py +++ b/src/python/models/items.py @@ -106,7 +106,7 @@ class UploadStatus(AutoStrEnum): Caching = auto() UploadingThumbnail = auto() CachingThumbnail = auto() - Failure = auto() # TODO + Failure = auto() @dataclass @@ -182,11 +182,11 @@ class Event(ModelItem): return self.date > other.date @property - def event_type(self) -> str: + def event_type(self) -> Type: if self.local_event_type: - return self.local_event_type.__name__ + return self.local_event_type - return type(self.source).__name__ + return type(self.source) @property def links(self) -> List[str]: diff --git a/src/python/utils.py b/src/python/utils.py index 163c2287..e2ccd387 100644 --- a/src/python/utils.py +++ b/src/python/utils.py @@ -136,6 +136,9 @@ def serialize_value_for_qml(value: Any) -> Any: if isinstance(value, Path): return f"file://{value!s}" + if inspect.isclass(value): + return value.__name__ + return value