diff --git a/src/aleph/vm/utils/__init__.py b/src/aleph/vm/utils/__init__.py index 507a41e0..15a57819 100644 --- a/src/aleph/vm/utils/__init__.py +++ b/src/aleph/vm/utils/__init__.py @@ -69,7 +69,7 @@ async def get_ref_from_dns(domain): return record[0].text -def to_json(o: Any): +def to_json(o: Any) -> dict | str: if hasattr(o, "to_dict"): # default method return o.to_dict() elif hasattr(o, "dict"): # Pydantic