We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8663485 commit 7999d98Copy full SHA for 7999d98
piccolo/query/base.py
@@ -1,4 +1,5 @@
1
from __future__ import annotations
2
+import datetime
3
import itertools
4
from time import time
5
import typing as t
@@ -26,7 +27,9 @@ def default(obj):
26
27
"""
28
Used for handling edge cases which orjson can't serialise out of the box.
29
- if isinstance(obj, UUID):
30
+ # This is the asyncpg UUID, not the builtin Python UUID, which orjon can
31
+ # serialise out of the box.
32
+ if isinstance(obj, (UUID, datetime.timedelta)):
33
return str(obj)
34
raise TypeError
35
0 commit comments