diff --git a/tipg/resources/response.py b/tipg/resources/response.py index 0640231b..73b4a185 100644 --- a/tipg/resources/response.py +++ b/tipg/resources/response.py @@ -4,6 +4,7 @@ from typing import Any import orjson +from asyncpg.pgproto import pgproto from fastapi.responses import JSONResponse @@ -12,6 +13,8 @@ def default(obj): """Instruct orjson what to do with types it does not natively serialize""" if isinstance(obj, decimal.Decimal): return str(obj) + elif isinstance(obj, pgproto.UUID): + return str(obj) def orjsonDumps(content: Any):