From 946db073555e9a815d51a1c21ad3f79b462561b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isabella=20Gross=20Alstr=C3=B6m?= Date: Wed, 16 Feb 2022 09:03:13 +0100 Subject: [PATCH] Revert "Fix "date is not serializable" error." --- custom_components/grocy/json_encode.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/custom_components/grocy/json_encode.py b/custom_components/grocy/json_encode.py index a4d49c2..a4482a9 100644 --- a/custom_components/grocy/json_encode.py +++ b/custom_components/grocy/json_encode.py @@ -1,6 +1,5 @@ import json from datetime import datetime -from datetime import date from pathlib import Path from typing import Any @@ -18,8 +17,6 @@ def default(self, o: Any) -> Any: return o.barcode if isinstance(o, datetime): return o.isoformat() - if isinstance(o, date): - return o.isoformat() if isinstance(o, set): return list(o) if isinstance(o, Path):