Skip to content

Commit 8a64ecc

Browse files
authored
Merge pull request #594 from acsone/19.0-FWP-590
[19.0][FIX] add datetime.time to JSONEncoder
2 parents b49d738 + 742cf61 commit 8a64ecc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

base_rest/http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def default(self, obj): # pylint: disable=E0202,arguments-differ
5353
return obj.isoformat()
5454
elif isinstance(obj, datetime.date):
5555
return obj.isoformat()
56+
elif isinstance(obj, datetime.time):
57+
return obj.isoformat()
5658
elif isinstance(obj, decimal.Decimal):
5759
return float(obj)
5860
return super().default(obj)

0 commit comments

Comments
 (0)