Skip to content

Commit

Permalink
Update json_encode.py
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellaalstrom authored Feb 16, 2022
1 parent b9172ce commit 8ff69d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/grocy/json_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def default(self, o: Any) -> Any:

if isinstance(o, (ProductBarcode, ProductBarcodeData)):
return o.barcode
if isinstance(o, datetime):
if isinstance(o, (datetime.datetime, datetime.date, datetime.time)):
return o.isoformat()
if isinstance(o, set):
return list(o)
Expand Down

0 comments on commit 8ff69d1

Please sign in to comment.